~/lightning

Lightning Talk: Memoizing Constexpr Programs

Lightningat CppCon 2021 · on Sunday, 2021-10-24· [large-language-models]
links:none on file
slides:none on file

Shows how to memoize constexpr recursion by dispatching through a variable template so recursion hits cached template instantiations instead of redoing work, implemented in the Haversack library and demonstrated on Godbolt. Claims about performance are concrete: about 50× faster compile time for fib(35) and avoids the compiler’s recursion cutoff for higher inputs. Intermediate variable templates are optimized out of the final binary. Downsides are real: memo keys are compile‑time only so you lose mixed runtime/compile evaluation and code complexity increases.

AI-written summary · about

  1. 0:00Start
  2. 2:06Memoization?
  3. 3:09Benefits of Variable Template Memoization
  4. 3:48Downsides
~/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.