~/talk

Fast and small C++ - When efficiency matters

Talkat Meeting C++ 2024 · 2024-11-14..11-16· [web-performance]
slides:none on file

Shows concrete microtechniques and measurable outcomes: uses compressed_pair with no_unique_address EBO to keep unique_ptr a single pointer; compares SSO sizes — libstdc++/MSVC ≈7‑byte payload, libc++ ≈15 bytes, FBstring up to 23 bytes — and explains the branch tradeoffs. Demonstrates constexpr reducing RAM/copies (assembly example: O0 209→78 instructions, O3 42→31), uses C++ Insights to inspect layouts, and points to a C++26 defect fix that lets compilers make std::initializer_list backing arrays static.

AI-written summary · about

  1. 0:00Introduction
  2. 1:01Unique pointer and deleters
  3. 8:13Empty base class optimization
  4. 18:56Small string optimization
  5. 24:23Comparing string implementations
  6. 31:50Clang’s SSO
  7. 37:21Small string payload limit
  8. 38:29Facebook’s FBString
  9. 40:26constexpr and memory
  10. 48:25Static optimization with initializer_list
  11. 55:36Summary and Q&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.