~/talk

There Are No Zero-cost Abstractions

Talkat CppCon 2019 · 2019-09-15..09-20· [software-architecture]
slides:none on file

Argument: claiming zero-cost abstractions is false and dangerous. Case study: adding arena allocation to protocol buffers (rolled out from late 2013) shifts cost into compiler work, pushing 90/99th-percentile file compile times up until single-file compiles hit 15-minute compile timeouts; deploying C++ modules reduces but does not remove the cost. Another case: using unique_ptr introduces extra loads and exception handling paths that measurably increase latency unless careful ABI and moves are used. Practical rule: measure, prefer simpler abstractions, and choose where to pay the cost.

AI-written summary · about

  1. 0:00Introduction and apology
  2. 1:54What abstractions cost
  3. 5:44Protocol buffers cost surprise
  4. 17:10Unique pointer overhead
  5. 28:46Function extraction trade-offs
  6. 33:01Guidelines for abstractions
  7. 35:51Abstractions as fire
  8. 36:35Q&A session
~/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.