Test "perf/app-lam"
Expected: 👍 accept · Size: 1.2 MB · Lines: 28.6 k · lean4export: 3.1.0 · Lean: 4.34.1 · Timeout: 1.7 m · 📄 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 | ⏱️ | 🧠 | |||
|---|---|---|---|---|---|---|
| sokonanoda | 👍 | 13 ms | (÷366) | 68.0 MB | (÷21) | |
| mathgraph | 👍 | 966 ms | (÷5.0) | 301.5 MB | (÷4.7) | |
| nanoclo | 👍 | 12 ms | (÷389) | 73.6 MB | (÷19) | |
| con-ron | 👍 | 12.2 s | (×2.5) | 4.8 GB | (×3.4) | |
| nanobruijn | 👍 | 32 ms | (÷149) | 35.0 MB | (÷41) | |
| nanoda | 👍 | 4.3 s | (-11%) | 2.1 GB | (+48%) | |
| lazylean | 👍 | 2.4 s | (÷2.1) | 78.0 MB | (÷18) | |
| con-leche | 👍 | 12.2 s | (×2.5) | 2.5 GB | (+82%) | |
| eink0rn | 👍 | 54 ms | (÷90) | 62.7 MB | (÷23) | |
| official | 👍 | 4.9 s | (0%) | 1.4 GB | (0%) | |
| ind-models | 👍 | 4.9 s | (+2%) | 1.4 GB | (+3%) | |
| lean4lean | 👍 | 4.9 s | (+1%) | 1.4 GB | (+2%) | |
| tenet | 👍 | 5.8 s | (+20%) | 1.7 GB | (+20%) | |
| tenet-hs | 👍 | 15.8 s | (×3.3) | 3.4 GB | (×2.4) | |
| lean4cobol | 👍 | 1.7 m | (×21) | 3.0 GB | (×2.2) | |
| evmlean | 🚫 | 308 ms | 107.6 MB | |||
| mini | ⌛ | 0 ms | 0 B | |||
| overfull | ⌛ | 0 ms | 0 B | |||
| metalean-slow | 🚫 | 148 ms | 83.4 MB | |||
| tenet-jvm | 👍 | 11.6 s | (×2.4) | 2.8 GB | (+97%) | |
| nanoclo-fortran | 👍 | 53 ms | (÷91) | 34.9 MB | (÷41) | |
| kiota | 👍 | 160 ms | (÷30) | 261.7 MB | (÷5.5) | |
| metalean-fast | 👍 | 12.5 s | (×2.6) | 2.0 GB | (+45%) | |
| canonical-min | ✋ | 464 ms | 1.1 GB | |||
| rpylean | 👍 | 220 ms | (÷22) | 117.6 MB | (÷12) | |
| vow-lean-kernel | ⌛ | 0 ms | 0 B | |||
| parse-only | 👍 | 96 ms | (÷51) | 73.9 MB | (÷19) |