Test "perf/proj-lazy-struct"
Expected: 👍 accept · Size: 44.9 KB · Lines: 808 · lean4export: 3.1.0 · Lean: 4.34.1 · Timeout: 50.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 | ⏱️ | 🧠 | |||
|---|---|---|---|---|---|---|
| sokonanoda | 👍 | 6 ms | (÷5.2) | 57.0 MB | (-13%) | |
| mathgraph | 👍 | 6 ms | (÷5.3) | 54.3 MB | (-18%) | |
| nanoclo | 👍 | 11 ms | (÷2.7) | 66.0 MB | (0%) | |
| con-ron | 👍 | 25 ms | (-20%) | 58.7 MB | (-11%) | |
| nanobruijn | 👍 | 7.2 s | (×230) | 670.8 MB | (×10) | |
| nanoda | 👍 | 2 ms | (÷17) | 3.1 MB | (÷21) | |
| lazylean | 👍 | 2 ms | (÷16) | 22.0 MB | (÷3.0) | |
| con-leche | 👍 | 7 ms | (÷4.6) | 22.4 MB | (÷2.9) | |
| eink0rn | 👍 | 145 ms | (×4.7) | 89.7 MB | (+36%) | |
| official | 👍 | 31 ms | (0%) | 65.8 MB | (0%) | |
| ind-models | 👍 | 113 ms | (×3.6) | 106.1 MB | (+61%) | |
| lean4lean | 👍 | 32 ms | (+1%) | 97.4 MB | (+48%) | |
| tenet | 👍 | 144 ms | (×4.6) | 46.1 MB | (-30%) | |
| tenet-hs | 👍 | 3 ms | (÷9.1) | 13.9 MB | (÷4.7) | |
| lean4cobol | 👍 | 30 ms | (-3%) | 13.9 MB | (÷4.7) | |
| evmlean | 👍 | 10.1 s | (×324) | 262.0 MB | (×4.0) | |
| mini | 🚫 | 37 ms | 74.8 MB | |||
| overfull | ⌛ | 0 ms | 0 B | |||
| metalean-slow | 🚫 | 34 ms | 75.9 MB | |||
| tenet-jvm | 👍 | 164 ms | (×5.3) | 68.4 MB | (+4%) | |
| nanoclo-fortran | 👍 | 23 ms | (-26%) | 16.0 MB | (÷4.1) | |
| kiota | 🚫 | 1.5 s | 618.6 MB | |||
| metalean-fast | 👍 | 35 ms | (+14%) | 79.9 MB | (+21%) | |
| canonical-min | ✋ | 392 ms | 1.1 GB | |||
| rpylean | 👍 | 2 ms | (÷21) | 5.9 MB | (÷11) | |
| vow-lean-kernel | ⌛ | 0 ms | 0 B | |||
| parse-only | 👍 | 30 ms | (-5%) | 66.5 MB | (+1%) |