3 ms·
Thanks for the context! What's the difference between the stage2 and stage3 binary? Does stage1 produce different binaries for the same input compared to stag
by lewurm 4y ago
Thanks for the context!
What's the difference between the stage2 and stage3 binary? Does stage1 produce different binaries for the same input compared to stage2/stage3?
- amaranth 4y agoIdeally there should be no difference and building stage 3 is basically a sanity check to ensure the compiler is working correctly.
- AndyKelley 4y agoNot 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 https://github.com/ziglang/zig/issues/12183