|
|
|
|
|
by MaxBarraclough
873 days ago
|
|
(Discussion of the LLVM-free compiler begins at 10:30 in the video.) As someone who hasn't been following this: improved compile-times seem achievable, but they surely can't hope to compete with LLVM in terms of opimisation, can they? Is the new backend intended to be used for quicker dev builds, or for final release builds too? From a look here [0] it seems to be the latter - full removal of LLVM for all builds - which surprises me. [0] https://github.com/ziglang/zig/issues/16270 |
|
This has been discussed more than once on Zig's discord server. Quoting Andrew and Matthew Lugg's discussion in #compiler-devel about pull 17892:
> mlugg: Shout-out to the people on Twitter and HN who are probably still saying "why would you try to compete with LLVM, LLVM is perfect and can do no wrong"
> andrewrk: worse, they're saying "LLVM is not great but it's the best mankind can achieve"
I think it's very appealing to have a project that focuses on fast build times and wants to seriously compete against LLVM in terms of the optimization pass pipeline, specially when you don't have a beefy computer. With that said, for the time being there are no optimizations made by Zig's own x86 backend (it neither does pass all behavior tests like it was pointed out in the talk, but it can build the Zig compiler itself and some other projects).
Cuik[1] is a project that was mentioned in the Q&A section which illustrates how a compiler can be fast and make optimised builds at the same time.
[1] https://github.com/RealNeGate/Cuik