Practical Techniques for Improving C++ Build Times
summary
Facebook shrinks C++ builds from hours to about five–ten minutes with a mix of tooling and code changes: use Buck for reproducible, content-addressed builds and HTTP + local caches, populate CI-built artifacts to get ~100% cache hits or use a warm revision (≈30% slower but automatic); offload compilation with distcc, run builds on tmpfs, update compilers for ~20% speedups, apply PGO for ~10% gains, strip ELF sections to avoid needless relinks, use visibility-inlines-hidden for ~50% link wins (watch static variables), and parallel link jobs (N≈4) for ~30% link speedups.
AI-written summary · about
chapters (7)
- 0:00Introduction and motivation
- 2:53Measuring build times
- 13:43Build system infrastructure
- 25:41Compiler and linking optimizations
- 34:17Codebase refactoring techniques
- 37:32Failed experiments and lessons
- 43:21Q&A session
related talks
01h 44mImproving C++ Compilation Times: Tools & Techniques
53mReducing C++ Compilation Times Through Good Design
59mThe Hitchhikers guide to faster builds
53mWhy Is My C++ Build So Slow? Compilation Profiling and Visualization
01h 03mDeveloping C++ @ Facebook Scale
22mOptimize Your C++ Development While Working From Home
38mStrategies to speed up build iteration, or dynamic hot reloading
23mtoolchain-agnostic build time improvements
