Lean Kernel Arena / perf/proj-cheap-struct

Test "perf/proj-cheap-struct"

Expected: 👍 accept · Size: 85.9 KB · Lines: 1.5 k · lean4export: 3.1.0 · Lean: 4.34.1 · Timeout: 50.0 s · 📄 Declaration · 🔗 Source

The declaration to check compares

(S u).re      and      (S ()).re

where u is a definition that unfolds to (), and reducing S _ to a constructor takes Θ(N) steps (it is a foldr over List.range N, with N = 2^17).

.re is a projection function, so both sides unfold to a primitive projection of S u and S (). Official reduces the structure of a projection during definitional equality only with whnf_core (no delta), compares the two stuck projections by their structures, and finds those equal by comparing the arguments of S. That is five unfoldings in all. A checker that fully reduces the structure of the projection to find a constructor evaluates S on both sides: Θ(N) steps, which runs into a step budget smaller than N.

Distilled from a Palomar submission, where the structure is a Finset.sum over Finset.range (2^17) under Complex.re.

Checker Result ⏱️ 🧠
sokonanoda 👍 1 ms (÷24) 67.8 MB (+2%)
mathgraph 👍 2 ms (÷21) 73.6 MB (+11%)
nanoclo 👍 2 ms (÷15) 55.6 MB (-16%)
con-ron 👍 27 ms (-22%) 61.0 MB (-8%)
nanobruijn 👍 6 ms (÷6.2) 13.6 MB (÷4.9)
nanoda 👍 3 ms (÷11) 3.3 MB (÷20)
lazylean 👍 3 ms (÷12) 22.0 MB (÷3.0)
con-leche 👍 10 ms (÷3.4) 22.4 MB (÷3.0)
eink0rn 👍 5 ms (÷7.0) 18.8 MB (÷3.5)
official 👍 35 ms (0%) 66.3 MB (0%)
ind-models 👍 124 ms (×3.6) 109.4 MB (+65%)
lean4lean 👍 36 ms (+4%) 98.5 MB (+49%)
tenet 👍 148 ms (×4.3) 46.4 MB (-30%)
tenet-hs 👍 6 ms (÷6.0) 19.0 MB (÷3.5)
lean4cobol 👍 61 ms (+77%) 14.1 MB (÷4.7)
evmlean ⌛ 0 ms 0 B
mini 🚫 39 ms 74.0 MB
overfull ⌛ 0 ms 0 B
metalean-slow 🚫 98 ms 77.3 MB
tenet-jvm 👍 215 ms (×6.2) 72.2 MB (+9%)
nanoclo-fortran 👍 5 ms (÷6.6) 4.8 MB (÷14)
kiota 👍 4 ms (÷9.7) 13.5 MB (÷4.9)
metalean-fast 👍 42 ms (+20%) 84.0 MB (+27%)
canonical-min 🚫 392 ms 1.1 GB
rpylean 👍 8.1 s (×233) 3.6 GB (×56)
vow-lean-kernel 👍 430 ms (×12) 9.3 MB (÷7.2)
parse-only 👍 32 ms (-7%) 65.9 MB (-1%)