perf: keep reused kernel `whnf` results without bound The `whnf_core` and `whnf` caches now keep results seen once in a bounded two-generation window, and move results that are looked up again, or computed again after leaving the window, into an unbounded table; the keys of all results computed so far are remembered by their hash only. So a result is computed at most twice, while results needed only once, such as the intermediate terms of long `decide +kernel` reductions, still do not stay alive. With the plain two-generation cache, `Mathlib.CategoryTheory.Abelian.Indization` executed 20.5% more instructions than with unbounded caches, now 16.6%, and evicting reused entries could repeat work without bound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This is the repository for Lean 4.
See Install Lean.
Please read our Contribution Guidelines first.
See Building Lean.