~/talk

Improving C++ Compilation Times: Tools & Techniques

Talkat ACCU 2023 · 2023-04-19..04-22· [c-and-cpp, developer-experience]
slides:none on file

Benchmarks show easy wins: use Ninja not make to cut seconds of build-system overhead (a SFML test drops make’s 6s overhead to ~1s), enable ccache to get ~35–50× apparent rebuild speed, and swap ld for clang’s lld or mold for large link speedups (lld shaved ~3s on an SFML build; mold can beat lld by orders of magnitude on Linux). Add PCH reuse (SFML full rebuild 34s→19s) and optional unity builds (~30% faster) but watch flags matching, anonymous-namespace/ODR and missing-include traps; use clang build analyzer to find hot headers and template instantiation hotspots.

AI-written summary · about

  1. 0:00Introduction
  2. 1:26Why compilation times matter
  3. 7:49Root causes of slow compilation
  4. 12:00Optimizing build times flow
  5. 14:49Low-hanging fruits for builds
  6. 21:16Optimizing linker speed
  7. 25:56Compilation caches impact
  8. 30:52Hardware and OS tweaks
  9. 34:19Pre-compiled headers
  10. 44:19Unity builds
  11. 54:54Profiling bottlenecks
  12. 1:02:19Physical design improvements
  13. 1:14:35Third-party optimizations
  14. 1:23:23Call to action
  15. 1:32:37Summary and checklist
  16. 1:34:26Extern templates
  17. 1:43:09Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.