7b3d6901
bench: apply mcode arena hardening across all bench scripts (3qu)
Added jit.opt.start('sizemcode=64', 'maxmcode=4096') to all 9 bench
scripts. Same fix 3o2 landed in bench/jit_trace.lua, propagated to the
rest. Without it, the macOS arm64 mcode allocator intermittently fails
to find an executable page in the signed-32-bit offset window and the
bench reports interpreter-only throughput with no diagnostic — visible
as silent regressions. The risk is higher in scripts with larger codegen
footprints than the trace gate.
Files touched: bench.lua, lazy_bench.lua, profile.lua, shapes_bench.lua,
starwing_bench.lua, wire_bench.lua, alloc_probe.lua, map_bench.lua,
packed_bench.lua. All 7 non-interactive scripts run rc=0; profile and
starwing loadfile-check clean.
Also refreshed bench/baseline.json per the issue's step 2. Surprise win:
full-mode decode allocations dropped 0.5-50% as a side-effect of auj/ozn
that was only visible after the snapshot. Most notable: proto2_basic
BenchPayload mid decode 2.313 -> 1.156 KB/op (-50%), Person 1KB decode
0.977 -> 0.953 KB/op. Runtime-mode unchanged — confirms the alloc
reduction is full-mode codegen specific.
Steps 3-4 (refresh COMPARISON.md throughput tables, verify the variance
band shrinks below the documented 5-10% drift) are deferred to a
work.lab.local run — laptop variance is 50%+ on identical state, can't
trust throughput A/Bs locally.
Eugene Blikh <bigbes@gmail.com> — 2026-05-24 20:41:52 UTC
Commit 7b3d69010b4ebad701bb98c0dda9e785823857d0 —
view raw patch
Parent(s):
c77ecc62
| File | Status | + | − |
|---|---|---|---|
.beads/issues.jsonl
|
M | +1 | -1 |
bench/alloc_probe.lua
|
M | +5 | |
bench/baseline.json
|
M | +8 | -8 |
bench/bench.lua
|
M | +4 | |
bench/lazy_bench.lua
|
M | +3 | |
bench/map_bench.lua
|
M | +3 | |
bench/packed_bench.lua
|
M | +3 | |
bench/profile.lua
|
M | +3 | |
bench/shapes_bench.lua
|
M | +3 | |
bench/starwing_bench.lua
|
M | +5 | |
bench/wire_bench.lua
|
M | +3 |