4 ms·
> 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
by rudedogg 3y ago
> 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:
- https://mitchellh.com/zig/parser#anatomy-of-an-ast-node https://mitchellh.com/zig/parser#anatomy-of-an-ast-node
- https://zig.news/kristoff/struct-of-arrays-soa-in-zig-easy-in-userland-40m0 https://zig.news/kristoff/struct-of-arrays-soa-in-zig-easy-i...
The creator of Zig also has a talk from Handmade Seattle talking about some of the performance gains they've had using these techniques:
- https://vimeo.com/649009599 https://vimeo.com/649009599
And a talk "Zig 2023 Roadmap" that is basically all about compilation speed:
- https://www.youtube.com/watch?v=AqDdWEiSwMM https://www.youtube.com/watch?v=AqDdWEiSwMM