From Jason Turner
Watch on YouTube

Summary

This episode demonstrates how to analyze and optimize C++ build times using Clang's time-trace feature. Jason examines his ChaiScript project, showing how to generate detailed trace files and visualize them using Chrome's tracing tool. He identifies three key optimization strategies: adding frequently included headers to a precompiled header list, reducing template instantiations, and using 'extern template'. By replacing multiple calls to std::make_unique with a more direct approach, he achieves a 25% compile time reduction.

Resources

Tags