lumbda/tests
russell@unturf.com 3f51a6b31b cached replay for Lumbda proof checker — matches Lean's build/replay split
Mirror Lean's behavior: a first run verifies the proof by rewriting
all five EML theorems, then writes a small artifact to
/tmp/lumbda-eml.cache with a magic header and the PASS lines.
Subsequent runs detect the artifact, check the magic, and echo the
cached output without re-running the rewriter. `rm -f
/tmp/lumbda-eml.cache` forces a cold re-check (analogous to `lake
clean`).

The whitepaper §8.6 now shows BOTH axes side by side:

                              cold    cached
  Lumbda asm                   44 ms    4 ms   <-- fastest tier
  Lumbda C (tree-walker)       64 ms    5 ms
  Lumbda Python --fast        619 ms  185 ms
  Lumbda C --fast            (hangs) (hangs)   <-- known bug
  Lean 4                      726 ms    2 ms   reference

Two comparisons matter:

- Cold vs cold: Lumbda asm verifies in 44 ms, Lean in 726 ms —
  16× faster end to end on the same five theorems.
- Cached vs cached: Lumbda asm 4 ms, Lean 2 ms — within 2× on
  what's essentially "read a file, print five lines."

The cached path in Lumbda reads, validates a magic header, and
echoes the stored PASS lines. No term rewriting. Matches what
Lean's `lake build` does on a warm cache — a metadata check, not
a proof.

tests/bench-proof.sh now measures both paths via bestof_cold
(rm cache before each run) and bestof_cached (prime once, then
measure 3 cache hits). `make bench-proof` regenerates the table.

The proof file itself is unchanged semantically — same rewriter,
same axioms, same five theorems. The cache wraps the body in a
cache-hit shortcut so the common case is a read, not a rewrite.
2026-04-17 20:47:38 -04:00
..
bench-3way.sh bench targets + whitepaper reproducibility + MOAD cheat sheet citation 2026-04-17 19:02:21 -04:00
bench-proof.sh cached replay for Lumbda proof checker — matches Lean's build/replay split 2026-04-17 20:47:38 -04:00
functional.lsp asm/c/py: add (load), ports, write-file/file->string — full cross-impl parity 2026-04-16 16:37:40 -04:00
portal-benchmark.sh portal benchmark + 3 mismatch defects fixed 2026-04-16 16:57:24 -04:00
portal-cross-load.lsp asm/c/py: add (load), ports, write-file/file->string — full cross-impl parity 2026-04-16 16:37:40 -04:00
portal-cross-save.lsp asm/c/py: add (load), ports, write-file/file->string — full cross-impl parity 2026-04-16 16:37:40 -04:00
portal-cross-test.sh asm/c/py: add (load), ports, write-file/file->string — full cross-impl parity 2026-04-16 16:37:40 -04:00
portal-exchange.lsp asm/c/py: add (load), ports, write-file/file->string — full cross-impl parity 2026-04-16 16:37:40 -04:00
portal-formats.lsp asm/c/py: add (load), ports, write-file/file->string — full cross-impl parity 2026-04-16 16:37:40 -04:00
rpc-chain-bench.sh rpc-chain-bench: Python → C relay → asm, timing end-to-end 2026-04-17 09:18:42 -04:00
web-benchmark.sh guardrails: bound http server, trap+cleanup bench, asm-no-GC in CLAUDE.md 2026-04-16 19:38:34 -04:00