Lean Kernel Arena / perf/unroll-versus-evaluate

Test "perf/unroll-versus-evaluate"

Expected: 👍 accept · Size: 44.6 KB · Lines: 1.2 k · lean4export: 3.1.0 · Lean: 4.36.0 · Timeout: 40.0 s · 📄 Declaration · 🔗 Source

The declaration to check compares

count #(n+1)      and      N.add (count #n) #1

where #k is the numeral with k successors, and count #k evaluates to #k in Θ(k²) reductions.

The head constants differ. Unrolling count once turns the left side into the right side, leaving a traversal of the shared numeral #n, for Θ(n); evaluating both sides costs Θ(n²). The test asks which of two differing head constants a checker chooses to unfold.

N=1000 in the Lean source. From Courant and Leroy, POPL 2026, §2.

Checker Result ⏱️ 🧠
nano-lean 👍 0.779 ms (÷45) 26.2 MB (÷3.5)
gruszka 👍 2.29 ms (÷15) 90.4 MB (-2%)
mathgraph 👍 2.59 ms (÷14) 36.5 MB (÷2.5)
sokonanoda 👍 2.50 ms (÷14) 36.3 MB (÷2.5)
pestka 👍 2.53 ms (÷14) 20.4 MB (÷4.5)
kefir 👍 1.22 ms (÷29) 8.4 MB (÷11)
kefir-wasm 👍 134 ms (×3.8) 91.3 MB (-1%)
con-ron 👍 30.4 ms (-14%) 41.9 MB (÷2.2)
con-ron-stream 👍 31.0 ms (-12%) 43.8 MB (÷2.1)
con-agua 👍 21.6 ms (-39%) 14.2 MB (÷6.5)
nanobruijn 👍 1.88 ms (÷19) 10.2 MB (÷9.0)
nanoda 👍 1.57 ms (÷23) 3.3 MB (÷28)
con-leche 👍 5.54 ms (÷6.4) 27.4 MB (÷3.4)
pestka-wasm 👍 525 ms (×15) 321.9 MB (×3.5)
official-nightly 👍 36.4 ms (+3%) 97.6 MB (+6%)
eink0rn 👍 2.40 ms (÷15) 13.4 MB (÷6.9)
official 👍 35.4 ms 92.4 MB
ind-models 👍 107 ms (×3.0) 113.5 MB (+23%)
kiota 👍 2.53 ms (÷14) 14.4 MB (÷6.4)
tenet 👍 139 ms (×3.9) 44.7 MB (÷2.1)
tenet-hs 👍 3.28 ms (÷11) 12.3 MB (÷7.5)
logos-kernel 👍 0.721 ms (÷49) 5.1 MB (÷18)
evmlean 🚫 2.16 s 282.6 MB
mini ⌛ — —
overfull ⌛ — —
lean4lean 👍 33.2 ms (-6%) 90.0 MB (-3%)
lean4cobol 👍 24.6 ms (-31%) 17.5 MB (÷5.3)
tenet-jvm 👍 169 ms (×4.8) 80.5 MB (-13%)
nanoclo 👍 3.62 ms (÷9.8) 56.4 MB (-39%)
vow-lean-kernel 👍 196 ms (×5.5) 15.3 MB (÷6.0)
canonical-min 🚫 390 ms 1.0 GB
lazylean 👍 1.39 ms (÷25) 21.4 MB (÷4.3)
rpylean 👍 1.06 ms (÷33) 10.3 MB (÷9.0)
metalean-slow 👍 1.84 s (×52) 1.4 GB (×16)
metalean-fast 👍 38.3 ms (+8%) 77.5 MB (-16%)
nanoclo-fortran 👍 8.96 ms (÷3.9) 7.8 MB (÷12)