4 ms·
Coincidentally in the project I'm currently working I managed to reduce our compile times significantly (~35% faster) using ClangBuildAnalyzer [1]. The main two
by snypehype46 2y ago
Coincidentally in the project I'm currently working I managed to reduce our compile times significantly (~35% faster) using ClangBuildAnalyzer [1]. The main two things that helped were precompiled headers and explicit template instantiations.
Unfortunately, the project still remains heavy to compile because of our use of Eigen throughout the entire codebase. The analysis with Clang's "-ftime-trace" show that 75-80% of the compilation time is spent in the optimisation stage, but not really sure what to do about that.
[1] https://github.com/aras-p/ClangBuildAnalyzer https://github.com/aras-p/ClangBuildAnalyzer
- celrod 2y agoWhat's the trick with explicit template instantiations? Including them in the precompiled header?
- logicchains 2y agoYou leave them uninstantiated in the header file and explicitly instantiate them in the .cc file (only works if there's a small number of possible instantiations).