> To write a fast compiler, it has to be fast from the start. The focus on compilation speed is one of the reasons I'm so interested in Zig. The compiler uses an interesting data-oriented design to represent the AST nodes, etc. You can read about it here: - [link] - [link] The creator of Zig also has a talk from Handmade Seattle talking about some of the performance gains they've had using these techniques: - [link] And a talk "Zig 2023 Roadmap" that is basically all about compilation speed: - [this video]
Hello HN! Here is some context to decorate this announcement: The Zig self-hosted compiler codebase consists of 197,549 lines of code. There are several different backends, each at varying levels of completion. Here is how many behavior tests are passing: LLVM: 1101/1138 (97%) WASM: 919/1138 (81%) C: 740/1138 (65%) x86_64: 725/1138 (64%) arm: 490/1138 (43%) aarch64: 411/1138 (36%) As you might guess, the one that this milestone is celebrating is the LLVM backend, which is now able to compile the compiler itself, despite 3% of the behavior tests not yet passing. The new compiler codebase, which is written in Zig instead of C++, uses significantly less memory, and represents a modest performance improvement. There are 5 more upcoming compiler milestones which will have a more significant impact on compilation speed. I talked about this in detail last weekend at the Zig meetup in Milan, Italy[1]. There are 3 main things needed before we can ship this new compiler to everyone. 1. bug fixes 2. improved compile errors 3. implement the remaining runtime safety checks If you're looking forward to giving it a spin, subscribe to [this issue]( [link] ) to be notified when it is landed in master branch. Edit: The talk recording about upcoming compiler milestones is uploaded now [1] [1]: [this video]
The worst part is that it's not done yet :^) This means that you will not find super complete introductory materials about every aspect of programming with Zig. The language reference is very good but for example the standard library doesn't have docs yet as we're still working on the autodoc tool. On the other hand reading the stdlib source code is very easy in good part thanks to the reasons you already mentioned in your post. [link] You might also be interested in reading about the project to see if you like where we're going (aside from technical details of the language). [link] [link] [link] [this video] You can find links to learning materials in the "learn" section of the official website: [link] Last but not least, at the moment we compensate the lack of learning materials by having a community that it's very good at helping newcomers, so make sure you join one of the communities.
Video list and Hacker News comment labels from HackerTube (prompted by @karpathy), released under ODC-By 1.0, built on the open-index/hacker-news archive. Hacker News data is provided by Y Combinator; comments remain the work of their authors. Video titles, channel names and thumbnails belong to their creators and are shown via YouTube. HackerTube Watch is an unofficial edition. Data export of 2026-10-31.
3 Hacker News comments
From the HN archive; up to 20 kept per video, favoring different commenters. Recommendations first.
Citations, criticism and jokes
Read more
Read more