Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What’s the opposite of damning with faint praise? “Removes many but not all of the C footguns. Self hosted compiler isn’t that much faster than Clang.”


> The Zig compiler is not particularly fast.

This really makes me question the accuracy of the rest of the article.

I'm really struggling to come up with a compiler that is faster than Zig.

Go, maybe? That's ... about the end of my shortlist.


Odin, Jai, C3, C.


Jai isn't open source so it is completely and totally irrelevant.

Zig builds C faster than most C compilers. You're going to have to do better than just mention it.

However, if those are the only things that are even possibly faster than Zig, then the Zig compiler qualifies as fast, not slow--which was my original point.


”Zig builds C faster than most C compilers” is a nonsense statement, which I don’t know how to answer.

The fact is simply that despite Zig uses LLVM as a backend in the same way Odin and C3 does, it compiles much slower. Exactly why that is, is something I can only guess at, but the fact is that Zig cached is still much slower to compile than Odin or C3.

(There are a few possible candidates as to why this is so that I identified and can share if it is interesting)

In any case, Zig is only ”fast to compile” if you compare to the triad of infamously slow languages: Swift, C++ and Rust.

Anything else is just hype.


It sure would be nice to have some concrete numbers from those projects to compare to for example ...

Note the discussion about "Incremental Build (libghostty-vt)" https://mitchellh.com/writing/zig-builds-getting-faster

https://biggo.com/news/202506090712_Zig_x86_Backend_Performa...


Embergen is 400kloc Odin, it compiles in about 2s. No incremental compilation or caching to speed it up.

And this is with LLVM as backend.


Thanks for the data point.


> Jai isn't open source so it is completely and totally irrelevant.

Worse, there's not even a compiler available. I don't even think there's even a spec.


This is just a convenient excuse. If Zig is to be fast to compile, it doesn’t help to make excuses for it.

Saying something it ”fast enough” because one is comparing with even slower languages is likely what made both Rust and Swift so slow to compile - they all just compared with C++, and it wasn’t until much later - when larger projects appeared - that the problem was taken more seriously. But at that time core architectural and language design concerns were already locked in.

This is why it’s not good for Zig to rest on its laurels and compare with worst of the class. And actually, faster Zig compile times benefits Jai, Odin and C3 as well, because then THOSE compilers can’t afford to slow down either. It’s a win-win.

If we compare with the worst though, then that’s a lose-lose proposition.


> This is just a convenient excuse.

Jai not relevant until open sourced. Period. End of discussion. Do not mention again.

C3 and Odin numbers and discussion certainly welcome.


I answered above.


> Saying something it ”fast enough” because..

Did you mean to reply to me? I was just making a point about the status of the Jai language.


Odin? Isn't that built on llvm?


It uses LLVM as the backend yes.


Lauding with faint blame ? :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: