Test "perf/proj-applied-struct"
Expected: 👍 accept · Size: 110.6 KB · Lines: 2.1 k · lean4export: 3.1.0 · Lean: 4.36.0 · Timeout: 3.83 min · 📄 Declaration · 🔗 Source
The declarations to check compare
(gC slowA c).fn x and (gC' slowA c).fn x
(and two variants), where gC' s c unfolds to gC s c, and gC s c is
if s = c then ⟨…, 0⟩ else ⟨…, 1⟩ for a structure whose field fn is a
function. slowA is a closed Nat that evaluates in 2^19 unit steps, and
c and x are variables.
Unfolding gC' makes the sides identical, for Θ(1). Reducing the
structure gC slowA c to a constructor instead decides slowA = c: it
evaluates slowA, for Θ(2^19), and then is stuck on c anyway.
Unlike in proj-cheap-struct, the projections are not compared as such:
each is the head of an application. Official reaches whnf_core with full
reduction of projected structures before it compares the applications by
their arguments.
Official (v4.35.0) needs about 19 s and 1.4 GB here, nearly all of it
evaluating slowA, slowB and slowC. Distilled from
AxiomMath/CFSG's CertificateChecks.KernelSporSch.RuE64.invol_eq, where
the same shape takes it over 24 GB and more than 1.5 hours.
| Checker | Result | ⏱️ | 🧠 | |||
|---|---|---|---|---|---|---|
| nano-lean | 👍 | 1.31 ms | (÷10704) | 40.5 MB | (÷36) | |
| gruszka | 👍 | 2.76 ms | (÷5077) | 50.0 MB | (÷29) | |
| sokonanoda | 👍 | 1.99 ms | (÷7046) | 47.6 MB | (÷30) | |
| rpylean | 👍 | 2.01 ms | (÷6969) | 12.1 MB | (÷120) | |
| pestka | 👍 | 4.04 ms | (÷3470) | 17.8 MB | (÷82) | |
| kefir | 👍 | 5.12 ms | (÷2739) | 6.4 MB | (÷226) | |
| palladium | 💥 | 1.84 s | 775.6 MB | |||
| con-ron | 👍 | 10.3 s | (-26%) | 2.7 GB | (+88%) | |
| kefir-wasm | 👍 | 214 ms | (÷66) | 105.7 MB | (÷14) | |
| con-agua | 👍 | 12.0 s | (-14%) | 3.4 GB | (×2.4) | |
| nanobruijn | 👍 | 10.5 s | (-25%) | 3.2 GB | (×2.2) | |
| nanoda | 👍 | 12.8 s | (-9%) | 2.6 GB | (+84%) | |
| con-leche | 👍 | 14.6 s | (+4%) | 3.2 GB | (×2.2) | |
| pestka-wasm | 👍 | 133 ms | (÷105) | 120.9 MB | (÷12) | |
| tenet-jvm | 👍 | 14.8 s | (+6%) | 3.7 GB | (×2.6) | |
| official-nightly | 👍 | 11.2 s | (-20%) | 1.4 GB | (0%) | |
| eink0rn | 👍 | 5.77 ms | (÷2430) | 19.5 MB | (÷75) | |
| official | 👍 | 14.0 s | 1.4 GB | |||
| ind-models | 👍 | 14.0 s | (0%) | 1.4 GB | (+1%) | |
| tenet | 👍 | 60.9 s | (×4.3) | 5.6 GB | (×3.9) | |
| tenet-hs | 👍 | 23.4 s | (+67%) | 829.7 MB | (-43%) | |
| kiota | 👍 | 6.07 ms | (÷2310) | 11.1 MB | (÷131) | |
| ocaml4lean | 👍 | 4.77 min | (×20) | 5.1 GB | (×3.6) | |
| logos-kernel | 🚫 | 295 ms | 318.1 MB | |||
| evmlean | 🚫 | 67.8 s | 434.7 MB | |||
| mini | 🚫 | 40.4 ms | 65.3 MB | |||
| overfull | ⌛ | — | — | |||
| lean4cobol | 🚫 | 9.07 s | 393.4 MB | |||
| lean4lean | ✋ | 800 ms | 235.6 MB | |||
| canonical-min | 🚫 | 393 ms | 1.0 GB | |||
| nanoclo | 👍 | 2.83 ms | (÷4954) | 63.6 MB | (÷23) | |
| vow-lean-kernel | 👍 | 681 ms | (÷21) | 18.1 MB | (÷80) | |
| lazylean | 👍 | 3.93 s | (÷3.6) | 326.2 MB | (÷4.5) | |
| metalean-slow | 🚫 | 2.44 s | 68.7 MB | |||
| metalean-fast | 👍 | 16.2 s | (+16%) | 3.7 GB | (×2.6) | |
| nanoclo-fortran | 👍 | 6.95 ms | (÷2018) | 5.5 MB | (÷264) | |
| mathgraph | 👍 | 1.91 ms | (÷7332) | 69.3 MB | (÷21) |