Vittorio Romeo :: Improving Compilation Times: Tools & Techniques
Channel: CoreCppIL
Date: 2024-04-01

Presented at Core C++ 2023 conference, Tel Aviv.

"Modules will solve everything", people say -- some optimistically, others sarcastically. However, modules are far from reaching real-world maturity, and it is still not certain whether they will improve compilation times in every situation and how costly it will be to migrate a large codebase.

Do we have to suffer with excruciating compilation times until we are able to migrate to modules? Not at all!

If you are interested in learning about practical tools and techniques to improve compilation times on codebases of any size, today, this talk is for you! We will cover:

* How to accurately benchmark the compilation time of a codebase and detect bottlenecks;
* Enabling precompiled headers in CMake, leveraging the "reuse from" feature;
* Automatically transforming your build into a "unity build";
* When to selectively replace heavyweight standard library headers;
* General techniques to reduce physical dependencies between components.

*** Vittorio Romeo ***

Vittorio Romeo (B.Sc. Computer Science, 6+ YoE at Bloomberg) works on mission-critical C++ infrastructure and provides Modern C++ training to hundreds of fellow employees.

He began programming around the age of 8 and became a C++ enthusiast shortly after discovering the language. Vittorio created several open-source C++ libraries and games, published many video courses and tutorials, actively participates in the ISO C++ standardization process, and maintains the popular SFML library.

He co-authored the acclaimed "Embracing Modern C++ Safely" book (published in January 2022) with J. Lakos, R. Khlebnikov, and A. Meredith.

Vittorio is an active member of the C++ community with an ardent desire to share his knowledge and learn from others: he presented and offered workshops over 20 times at international C++ conferences (including CppCon, C++Now, ++it, ACCU, C++ On Sea, C++ Russia, and Meeting C++), covering topics of various nature.

He also maintains a website with advanced C++ articles and a YouTube channel featuring well-received modern C++11/14 tutorials. Lastly, he's active on StackOverflow, taking great care in answering interesting C++ question (90k reputation).

When he's not writing code, Vittorio enjoys weightlifting, playing volleyball, scuba diving, canyoning, gaming, and enjoying sci-fi content.