THE FOLD / GRIND / WARM CACHE / WARM CACHE
WARM CACHE
the second time is always faster
compute fib(20)
NAIVE recursion — calls: —
MEMOISED — calls: —
speedup: —× fewer calls · fib = —
LIT Genuine recursion, genuinely counted. Naive Fibonacci recomputes the same subproblems, making 2·fib(n+1)−1 calls (fib(20) → 21,891); a memo table makes each n once, O(n) calls (fib(20) → 39). Both run live and report their real call counts — the speedup you see is measured, not asserted.
FIG 'Warm cache / the second time is faster' is the arcade line; the mechanism (overlapping subproblems, memoised) is the honest computer-science underneath.
FIG 'Warm cache / the second time is faster' is the arcade line; the mechanism (overlapping subproblems, memoised) is the honest computer-science underneath.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of WARM CACHE · David Lee Wise (ROOT0), with AVAN