Fast and Small C++ - When Efficiency Matters
Talkat CppCon 2024 · on Tuesday, 2024-09-17· at 14:00· Adams A, 6700 North Gaylord Rockies Boulevard·
summary
Shows how empty-base/CompressedPair tricks shrink a unique_ptr with a compile-time deleter to pointer size, demonstrates EBO + C++20 no_unique_address and C++23 static lambdas saving instructions, measures SSO tradeoffs across implementations (libstdc++ 7‑byte SSO, libc++ 15‑byte, Facebook 23‑byte) and counts bytes, uses constexpr to eliminate runtime copies and ROM→RAM init, highlights C++ Insights to inspect layouts, and explains the C++26 backing-array wording that lets compilers make initializer_list arrays static.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 2:58Unique pointer and compressed pair
- 14:46Small string optimization
- 32:03Small string buffer capacity
- 36:46Facebook's string and const expressions
- 44:10C++26 initializer lists
- 53:36Summary
related talks
01h 05mFast and small C++ - When efficiency matters
32mSmall is beautiful: Techniques to minimise memory footprint
01h 00mMoving Faster: Everyday efficiency in modern C++
01h 01mFaster, Easier, Simpler Vectors
36mInterfaces Matter
56m“High Performance Code 201: Hybrid Data Structures"
58mC++ Performance and Optimisation
55mCode Size Compiler Optimizations and Techniques for Embedded Systems
