Test "perf/proj-lazy-struct"
Expected: 👍 accept · Size: 44.9 KB · Lines: 808 · lean4export: 3.1.0 · Lean: 4.36.0 · Timeout: 40.0 s · 📄 Declaration · 🔗 Source
The declaration to check compares
(P (slow 100000)).1 and (Q (slow 100001)).1
where P a and Q a both unfold to (0, a), and slow n takes Θ(n)
steps to evaluate.
Official compares two projections of the same structure by lazily
unfolding their structs, and projects as soon as neither side unfolds
any further: after unfolding P and Q, it compares just the first
fields, 0 and 0. That is four unfoldings in all. A checker that
instead compares the two structs completely (here (0, slow 100000)
and (0, slow 100001)) before projecting also compares the second
fields, which differ, and does so by evaluating slow.
This is the counterpart of proj-cheap-struct, where the structs must
not be evaluated because they are equal by their arguments.
| Checker | Result | ⏱️ | 🧠 | |||
|---|---|---|---|---|---|---|
| nano-lean | 👍 | 0.955 ms | (÷37) | 30.3 MB | (÷3.0) | |
| gruszka | 👍 | 4.23 ms | (÷8.4) | 110.0 MB | (+19%) | |
| mathgraph | 👍 | 5.58 ms | (÷6.4) | 43.7 MB | (÷2.1) | |
| sokonanoda | 👍 | 5.25 ms | (÷6.8) | 43.6 MB | (÷2.1) | |
| pestka | 👍 | 3.14 ms | (÷11) | 19.0 MB | (÷4.9) | |
| kefir | 👍 | 2.53 ms | (÷14) | 6.1 MB | (÷15) | |
| kefir-wasm | 👍 | 193 ms | (×5.4) | 95.7 MB | (+4%) | |
| con-ron | 👍 | 30.5 ms | (-14%) | 43.7 MB | (÷2.1) | |
| con-ron-stream | 👍 | 31.1 ms | (-13%) | 47.1 MB | (-49%) | |
| con-agua | 👍 | 21.8 ms | (-39%) | 19.2 MB | (÷4.8) | |
| nanobruijn | 👍 | 3.36 ms | (÷11) | 16.6 MB | (÷5.5) | |
| nanoda | 👍 | 1.87 ms | (÷19) | 3.1 MB | (÷30) | |
| con-leche | 👍 | 5.87 ms | (÷6.1) | 25.4 MB | (÷3.6) | |
| pestka-wasm | 👍 | 535 ms | (×15) | 323.5 MB | (×3.5) | |
| official-nightly | 👍 | 36.4 ms | (+3%) | 97.6 MB | (+6%) | |
| eink0rn | 👍 | 145 ms | (×4.1) | 89.2 MB | (-3%) | |
| official | 👍 | 35.5 ms | 92.1 MB | |||
| ind-models | 👍 | 113 ms | (×3.2) | 107.0 MB | (+16%) | |
| kiota | 👍 | 1.23 s | (×35) | 868.4 MB | (×9.4) | |
| tenet | 👍 | 148 ms | (×4.2) | 44.8 MB | (÷2.1) | |
| tenet-hs | 👍 | 3.44 ms | (÷10) | 13.1 MB | (÷7.0) | |
| logos-kernel | 👍 | 0.794 ms | (÷45) | 4.4 MB | (÷21) | |
| evmlean | 👍 | 10.2 s | (×286) | 280.8 MB | (×3.0) | |
| mini | 🚫 | 36.5 ms | 65.2 MB | |||
| overfull | ⌛ | — | — | |||
| lean4lean | 👍 | 33.5 ms | (-6%) | 89.5 MB | (-3%) | |
| lean4cobol | 👍 | 30.1 ms | (-15%) | 13.8 MB | (÷6.7) | |
| tenet-jvm | 👍 | 161 ms | (×4.5) | 79.8 MB | (-13%) | |
| nanoclo | 👍 | 11.4 ms | (÷3.1) | 61.9 MB | (-33%) | |
| vow-lean-kernel | ⌛ | — | — | |||
| canonical-min | ✋ | 392 ms | 1.0 GB | |||
| lazylean | 👍 | 1.95 ms | (÷18) | 21.6 MB | (÷4.3) | |
| rpylean | 👍 | 1.24 ms | (÷29) | 11.7 MB | (÷7.9) | |
| metalean-slow | 🚫 | 34.1 ms | 64.1 MB | |||
| metalean-fast | 👍 | 35.5 ms | (0%) | 77.6 MB | (-16%) | |
| nanoclo-fortran | 👍 | 23.3 ms | (-34%) | 15.9 MB | (÷5.8) |