Test "perf/beta-ladder"
Expected: 👍 accept · Size: 450.6 KB · Lines: 10.4 k · lean4export: 3.1.0 · Lean: 4.34.1 · Timeout: 50.0 s · 📄 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 | ⏱️ | 🧠 | |||
|---|---|---|---|---|---|---|
| sokonanoda | 👍 | 66 ms | (÷25) | 226.2 MB | (÷2.2) | |
| mathgraph | 👍 | 8.4 s | (×5.0) | 1.4 GB | (×2.9) | |
| nanoclo | 👍 | 6 ms | (÷270) | 69.4 MB | (÷7.2) | |
| con-ron | 👍 | 3.0 s | (+78%) | 1.3 GB | (×2.6) | |
| nanobruijn | 👍 | 1.6 s | (-6%) | 823.9 MB | (+65%) | |
| nanoda | 👍 | 1.3 s | (-24%) | 607.5 MB | (+22%) | |
| lazylean | 👍 | 668 ms | (÷2.5) | 47.4 MB | (÷11) | |
| con-leche | 👍 | 2.4 s | (+46%) | 552.8 MB | (+11%) | |
| eink0rn | 👍 | 686 ms | (÷2.4) | 95.5 MB | (÷5.2) | |
| official | 👍 | 1.7 s | (0%) | 499.9 MB | (0%) | |
| ind-models | 👍 | 1.7 s | (+4%) | 540.2 MB | (+8%) | |
| lean4lean | 👍 | 1.7 s | (+1%) | 530.1 MB | (+6%) | |
| tenet | 👍 | 2.3 s | (+37%) | 574.9 MB | (+15%) | |
| tenet-hs | 👍 | 3.2 s | (+92%) | 683.9 MB | (+37%) | |
| lean4cobol | 👍 | 30.9 s | (×18) | 796.6 MB | (+59%) | |
| evmlean | 🚫 | 7.8 s | 394.3 MB | |||
| mini | 👍 | 933 ms | (-44%) | 205.3 MB | (÷2.4) | |
| overfull | ⌛ | 0 ms | 0 B | |||
| metalean-slow | 🚫 | 78 ms | 79.6 MB | |||
| tenet-jvm | 👍 | 2.2 s | (+35%) | 603.8 MB | (+21%) | |
| nanoclo-fortran | 👍 | 23 ms | (÷74) | 13.5 MB | (÷37) | |
| kiota | 👍 | 582 ms | (÷2.9) | 538.5 MB | (+8%) | |
| metalean-fast | 👍 | 3.4 s | (×2.1) | 658.9 MB | (+32%) | |
| canonical-min | ✋ | 416 ms | 1.1 GB | |||
| rpylean | 👍 | 2.7 s | (+60%) | 1.4 GB | (×2.9) | |
| vow-lean-kernel | ⌛ | 0 ms | 0 B | |||
| parse-only | 👍 | 52 ms | (÷32) | 66.2 MB | (÷7.6) |