~/talk

Reducing Template Compilation Overhead, Using C++11, 14, 17, and 20.

Talkat CppCon 2019 · 2019-09-15..09-20· [c-and-cpp, developer-experience]
slides:none on file

Investigates concrete ways to cut heavy template compile costs: replaces deep recursive template instantiations with memoized templates and std::integral_constant wrappers, converts recursion that blows up at 27–28 to if constexpr or template memoization, collapses n^3 tuple instantiation to near O(n) via index_sequence leaf inheritance, and swaps std::enable_if for cleaner C++20 constraints. Reports real effects: builds that hit ~10 GB RAM or fail; GCC handles one case in <0.5s while MSVC takes ~10s; the shown wrappers and using-declaration moves drastically reduce instantiations and debug-symbol bloat.

AI-written summary · about

  1. 0:00Introduction
  2. 0:13The problem of template bloat
  3. 1:08Background on template costs
  4. 9:45Function signature mangling
  5. 12:07Implementing an efficient tuple
  6. 27:05Reducing instantiation overhead
  7. 37:18API contracts and behavior
  8. 37:39Advanced template tricks
  9. 39:04Future of compiler optimization
  10. 42:48Q&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.