Hacker News new | ask | show | jobs
by amaranth 1405 days ago
Ideally there should be no difference and building stage 3 is basically a sanity check to ensure the compiler is working correctly.
1 comments

Not quite - what you said is true for a hypothetical "stage4" however there is a distinct difference between stage2 and stage3. While they are built from the same source code, and therefore have the same logic, they are lowered by different backends, meaning they will have potentially drastically different performance characteristics depending on the differences between the stage1 and stage2 backend, respectively.

Related: https://github.com/ziglang/zig/issues/12183