Test "perf/beta-ladder"
Expected: 👍 accept · Size: 450.2 KB · Lines: 10.4 k · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration · 🔗 Source
The declaration to check reduces
(fun x₁ => … (fun xₙ => x₁ + (x₂ + (… + (xₙ + 0)))) 0 …) 0
to 0, through n beta redexes over a body that reads every binder.
Reducing the ladder takes n beta steps whatever a checker does, so the test is what one step costs. Substituting into the body on entry to binder k copies the n − k redexes still below it, and those copies sum to Θ(n²). Carrying the substitution in an environment leaves the body untouched, for Θ(n).
N=2000 in the Lean source.
| Checker | Result | ⏱️ | 🧠 | |||
|---|---|---|---|---|---|---|
| mathgraph | 👍 | 7 ms | (÷253) | 50.6 MB | (÷9.8) | |
| ind-models | 👍 | 1.7 s | (+2%) | 528.6 MB | (+7%) | |
| official-nightly | 👍 | 1.7 s | (-1%) | 499.6 MB | (+1%) | |
| evmlean | 🚫 | 7.1 s | 282.1 MB | |||
| nanoda | 👍 | 1.1 s | (-33%) | 607.4 MB | (+23%) | |
| mini | 👍 | 946 ms | (-44%) | 211.5 MB | (÷2.3) | |
| lean4lean | 👍 | 1.7 s | (0%) | 527.8 MB | (+7%) | |
| sokonanoda | 👍 | 297 ms | (÷5.7) | 924.1 MB | (+87%) | |
| zignodamus | 👍 | 336 ms | (÷5.0) | 856.3 MB | (+73%) | |
| nanoclo | 👍 | 7 ms | (÷256) | 69.4 MB | (÷7.1) | |
| nanobruijn | 👍 | 746 ms | (÷2.3) | 327.4 MB | (-34%) | |
| kiota | 👍 | 667 ms | (÷2.5) | 840.5 MB | (+70%) | |
| official | 👍 | 1.7 s | (0%) | 495.0 MB | (0%) | |
| vow-lean-kernel | 💥 | 16.3 s | 269.3 MB | |||
| rpylean | ✋ | 40 ms | 58.9 MB | |||
| official-v4.28.0 | 👍 | 1.8 s | (+9%) | 506.0 MB | (+2%) | |
| still-nanoda | 👍 | 1.1 s | (-33%) | 607.5 MB | (+23%) | |
| nyaya | 💥 | 4.3 s | 718.4 MB | |||
| parse-only | 👍 | 53 ms | (÷32) | 62.1 MB | (÷8.0) |