3 ms·
I regularly work with multi-thousand line source files, but compilation speed has never really been an issue there, at least for me. The issue has always been t
by xxpor 6y ago
I regularly work with multi-thousand line source files, but compilation speed has never really been an issue there, at least for me. The issue has always been the link time afterwards (especially if you turn LTO on). I guess its probably more of an issue for C++.
Is anyone working on adding parallel linking to GCC like clang has?
- kevincox 6y agoI agree. In all of the large projects I have worked on the build systems were constantly optimized under the observation is that compilation is infinitely parallelizable and the latency doesn't matter nearly as much as throughput but the link is the expensive step on the critical path.
- ComputerGuru 6y agoLinking improvements would have far-reaching benefits. I have similar observations to your comment regarding both C++ and rust.
- rrss 6y agoI'm not familiar with clang's support for parallel linking, so maybe this isn't what you mean, but GCC supports parallel ltrans for LTO, and IIRC GCC 10 made multithreaded ltrans the default behavior.
- xxpor 6y agoYeah, I could just be behind. I try to at least know what GCC is up to, but for one of the platforms I work with we're still stuck on GCC 4.9 :(
- cryptonector 6y agoTry building the SQLite3 amalgamation.
- saagarjha 6y agoFor C++ it really does become an issue, since each individual file can take over a second to compile (usually depending on how heavy the template usage is), even for moderately-sized files (~1000 lines).
- matt42 6y agoProjects using templates and heavy metaprogramming often see most of the compile time spent in template instantiation, not in link time. For this kind of projects I think this would help.