Lightning Talk: Memoizing Constexpr Programs
summary
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
chapters (4)
related talks
06mLightning Talk: The Lambda Calculus in C++ Lambdas
01h 06mReflection in C++ - Past, Present, and Hopeful Future
41mInfinite Lambda Calculus
01h 03mKeynote: Why Functional Programming Matters
53mThe Best We Can Do?
40mWrite the Other Half of Your Program
16mA Domain-Specific Probabilistic Programming Language for Reasoning about Reasoning(…)
14mPutting the "fun" in function calling
