fe857ac0
bench: alloc decomposition probe
Adds bench/alloc_probe.lua, a surgical probe that strips the encode path apart and measures KB-delta per primitive operation. Lets us attribute the ~136 B/op encode floor (captured in the perf-analysis-2026-05-18 memo) to a specific source: result table, intermediate varint strings, output string, etc. Runs with GC stopped so allocations accumulate; divides by N to get bytes-per-op. Uses unique input bytes per iteration where appropriate to eliminate string-interning noise. Complements bench/profile.lua (where time goes) with where *memory* goes — the two together informed which bd perf items were worth landing (the bytes-saved had to translate to a real allocation rate change, not just a hot-line attribution).
Eugene Blikh <bigbes@gmail.com> — 2026-05-18 19:51:34 UTC
Commit fe857ac03631666de689cd0973ce68459505f745 —
view raw patch
Parent(s):
a0f0ce2d
| File | Status | + | − |
|---|---|---|---|
bench/alloc_probe.lua
|
A | +167 |