News for hackers. Stuff that matters.
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.
Re:24-core CPU and I can’t move my mouse by ori_b on Monday July 10, 2017 @04:47AM (#14734285)
And trashes incremental compilation time, which is what really matters.
Re:24-core CPU and I can’t move my mouse by swift on Monday July 10, 2017 @04:59AM (#14734337)
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.
Re:24-core CPU and I can’t move my mouse by pjc50 on Monday July 10, 2017 @05:21AM (#14734432)
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.
Re:24-core CPU and I can’t move my mouse by DiThi on Monday July 10, 2017 @07:59AM (#14735122)
You can have all the files you're working on not concatenated.
Re:24-core CPU and I can’t move my mouse by ori_b on Monday July 10, 2017 @05:44PM (#14739964)
That's painfully manual.
Re:24-core CPU and I can’t move my mouse by DiThi on Tuesday July 11, 2017 @07:45AM (#14743307)
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.
Re:24-core CPU and I can’t move my mouse by jhasse on Monday July 10, 2017 @06:35AM (#14734749)
Also called unity build sometimes.