Re:24-core CPU and I can’t move my mouse
by pjc50 on Monday July 10, 2017 @04:39AM
(#14734262)
"Concatenated" builds seem to be the best band-aid for this. Concatenate as many source files as possible before compiling, #include a bunch of cpp files into one big file. It makes tracking down errors slightly harder and macros a bit more risky, but greatly improves the overall build efficiency.
[ Parent
| on HN ]
And trashes incremental compilation time, which is what really matters.
It's a balance, but on many projects the overhead of the headers themselves is so large that concatenating a few .cpp files together doesn't increase incremental compilation time significantly over simply building each .cpp file in isolation.
Incremental compilation opportunities are rarer than we'd like on C++: as soon as you add a new class member or function, that's potentially a huge recompile.
You can have all the files you're working on not concatenated.
That's painfully manual.
It doesn't need to be. I think it shouldn't be hard to make a build script that re-makes the bundles except for files modified in the last hour.