Hacker News new | ask | show | jobs
by 1a527dd5 8 days ago
This is what I like to call performative performance programming. I _LOVE_ performance as much as the next guy. And build times should be as close to 0 seconds as possible.

But this is approaching diminishing returns and I guarantee that your CURRENT bottleneck is not build times.

2 comments

The people who originally worked on Bun themselves would disagree with your point (but their situation was based on the premise that they did not take the steps required to leverage incremental compilation): https://zackoverflow.dev/writing/i-spent-181-minutes-waiting...

And, unrelated to Bun, I too would disagree. You don't want to have to wait minutes for a build to complete before you can run the test suite, or even just know if there was a semantic error in your code. Build times are 100% a bottle neck for big-enough projects.

> TLDR; The Zig compiler takes about 1 minute and 30 seconds to compile debug builds of Bun. Zig's language server doesn't do basic things like type-checking, so often have to run the compiler to see if my code works.

90 seconds to less than 1 second. That's astonishing

It’s not so astonishing when you mention that incremental compilation has been only recently added to Zig and is still experimental. This astonishing change, if I understand it correctly, is achieved simply by migrating to the latest version of Zig and enabling this experimental feature.
I expect it to drop to 300ms once it no longer relies on Mold for linking. Zig's experimental linker can just modify the binary in place.
No. Fast builds are a must for a project like this, in my opinion. This is an important step towards making the project easier to maintain.