~/talk

Does the C++ compiler work too hard?

Talkat Core C++ 2023 · 2023-06-05..06-07· [developer-experience, c-and-cpp]
name:Alex Cohn
links:none on file
slides:none on file

Analysis of large C++ projects shows compiler cost dominated by per-invocation work and translation-unit size rather than optimization level. Measured on Unreal Engine (full build ~5 hours) with 24,000 compilation units collapsing to 2,300 with unity builds cuts time dramatically, and precompiled headers take 4 minutes but make a module go from 700 to 500 minutes. Object file size correlates strongly with compile time, O3 vs Os vs Oz changes little, sqlite single-file inl units are surprising outliers, and results hold across Clang and GCC.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 1:38Analyzing Unreal Engine builds
  3. 4:08Build optimization strategies
  4. 7:45Compiler behavior patterns
  5. 13:20Correlation of size and time
  6. 19:01Deep dive into Unity builds
  7. 22:48Parallel compilation impacts
  8. 25:21Outliers and optimization tests
  9. 30:28Cross-project results and closing
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.