Content deleted Content added
→Versions: add [clarification needed] |
→Versions: use proper multiplication sign |
||
Line 110:
==Versions==
Since version 0.10 the (new default) Zig compiler is written in the Zig programming language, i.e., it is a [[self-hosting compiler]], and that is a major new feature of that release. The older legacy [[Bootstrapping (compilers)|bootstrapping]] compiler, written in C++, is still an option but will not be in version 0.11. When compiling<!-- "Peak RSS: 9.6 GiB to 2.8 GiB (3.5× less memory used)" in docs "8.5 GB to 0.5 GB" in YouTube video may be wrong claim. --> with the new Zig compiler much less memory is used and it compiles a bit faster. The older, now legacy, C++ based compiler uses 3.
Zig's default backend for optimization is still [[LLVM]],<ref>New LLVM version 15, Zig legacy uses version 13</ref> and LLVM is written in C++. The Zig compiler with LLVM is 169 MiB{{Clarify|date=January 2025}}, vs without LLVM 4.4 MiB. Faster executable code is usually compiled with the new Zig-lang based compiler, its LLVM code generation is better, and it fixes many bugs, but there are also improvements for the older legacy compiler in version 0.10. The self-hosted linker is tightly coupled with the self-hosted compiler. The new version also adds some experimental (tier-3) support for AMD GPUs (there's also some lesser support for Nvidia GPUs and for PlayStation 4 and 5<!-- assumed since .ps5, .ps4, also vulkan, glsl450, nvptx and nvptx64 in source code. -->).
|