Test "perf/app-lam"
Expected: 👍 accept · Size: 1.2 MB · Lines: 28.6 k · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration · 🔗 Source
A synthetically generated term with n levels of alternating applications and lambdas, with DAG sharing.
At each level, a constant is applied to two identical lambda arguments. The export format records these as a single shared expression (DAG). Each lambda body grows with the nesting depth, referencing all enclosing binders.
This tests two aspects of checker performance:
Infer cache: Since both arguments at each level are the same expression, a checker without an infer cache re-infers the type of each shared subterm, doubling work at every level — O(2ⁿ) total.
Substitution cost: Even with a cache, type-inferring each lambda requires substituting into its body (size O(n)) at each of the n levels, giving O(n²) total. Whether this cost arises depends on the checker's binder representation.
| Checker | Result | ⏱️ | 🧠 | |||
|---|---|---|---|---|---|---|
| mathgraph | 👍 | 14 ms | (÷340) | 64.2 MB | (÷22) | |
| ind-models | 👍 | 4.9 s | (+1%) | 1.4 GB | (+2%) | |
| official-nightly | 👍 | 4.9 s | (-1%) | 1.4 GB | (0%) | |
| evmlean | 🚫 | 305 ms | 106.9 MB | |||
| nanoda | 👍 | 3.9 s | (-21%) | 2.1 GB | (+48%) | |
| mini | 💥 | 35.7 s | 78.5 MB | |||
| lean4lean | 👍 | 4.9 s | (0%) | 1.4 GB | (+2%) | |
| sokonanoda | 👍 | 14 ms | (÷341) | 64.0 MB | (÷22) | |
| zignodamus | 👍 | 14 ms | (÷361) | 18.1 MB | (÷79) | |
| nanoclo | 👍 | 13 ms | (÷382) | 83.6 MB | (÷17) | |
| nanobruijn | 👍 | 27 ms | (÷183) | 22.0 MB | (÷65) | |
| kiota | 👍 | 55 ms | (÷89) | 179.4 MB | (÷7.9) | |
| official | 👍 | 4.9 s | (0%) | 1.4 GB | (0%) | |
| vow-lean-kernel | 💥 | 1.2 m | 19.7 MB | |||
| rpylean | 👍 | 178 ms | (÷28) | 121.3 MB | (÷12) | |
| official-v4.28.0 | 👍 | 5.3 s | (+9%) | 1.4 GB | (+1%) | |
| still-nanoda | 👍 | 3.9 s | (-21%) | 2.1 GB | (+48%) | |
| nyaya | 💥 | 4.5 s | 716.3 MB | |||
| parse-only | 👍 | 97 ms | (÷51) | 62.3 MB | (÷23) |