5 ms·
> that involved clang replacing ack, so builds went from ~10 minutes to 3+ hours Are those real numbers? Yikes. I mean, I don't disbelieve it, it's just a re
by ajross 6y ago
> that involved clang replacing ack, so builds went from ~10 minutes to 3+ hours
Are those real numbers? Yikes. I mean, I don't disbelieve it, it's just a reminder about how far we've fallen. Modern compilers are indeed amazing tools, but those last 8-10% of features (performance, safety, etc...) have come at an absolutely staggering price.
And clang isn't really that big an offender, being only a tiny bit slower than GCC. C++ and Rust are a solid order of magnitude slower still.
- ori_b 6y agoEasily believable. Keep in mind that clang is part of the userspace that clang is building. Moving to clang means building that instead of building ack, you're building clang. Plan 9 is similar: a full system rebuild takes about 45 seconds on my hardware. A clang (and just a clang build) build on similar hardware takes about 2 hours.
- xfer 6y agoYes, i miss the days when i could make changes to the system and recompile in under a minute on Plan9. Such a distraction free programming environment.
- sim_card_map 6y agoWhat compiler does plan9 use?
- bonzini 6y agoIt uses a homegrown C compiler; the Go compiler is actually derived from it.
- rtpg 6y agoAre there any good articles on the reasons behind some of this stuff? Like beyond performance bit-twiddling, are there issues due to a lot of extra layers for more pluggable infrastructure? I just don't get how the gulf can be this wide on something so many devs are clearly frustrated about.
- otabdeveloper4 6y agoOptimizations play a big part. Modern optimizing compilers are solving lots of hoary computational graph problems, etc., behind the scenes.
- eek04_ 6y agoAs somebody that used program on the Amiga, using SAS C: GCC is/was terrible, speed-wise. We're talking 10-20x slowdown. Sounds like ack is on the same level as SAS C, and clang is on the same speed as GCC. This had NOTHING to do with > those last 8-10% of features (performance, safety, etc...) have come at an absolutely staggering price SAS C had better generated code and more features. It was purely a question of architecture - SAS C was architected for speed, and actively used caches (especially precompiled header files) to avoid re-doing work. GCC didn't, and I've seen no hint of that appearing in GCC since.
- CJefferson 6y agoGCC has had precompiled headers for years. They don't really help in C, bceause the time spent parsing headers isn't a significant chunk of runtime in practice. They can be useful in C++, as it's common to include massive amounts of templated code in headers, but they still only buy you 20% at best.
- eek04_ 6y agoFor speed-architected C compilers/linkers lexing time is typically a very significant part of compilation time. The Unix compilers typically hasn't been speed-architected, instead having a focus on simplicity and ease of porting.
- stjohnswarts 6y agoBut do you recompile the tools every time you recompile the kernel? I don't understand the big deal if it's a once a week thing? Or even once a month? Are you changing the compiler/toolchain constantly as you change the kernel? That seems counter productive.