07bff24527
Two new throughput fixtures targeting blind spots in the 21'a
corpus:
- bench_closure_chain exercises the build_pair_drop_fn codegen
path (the 18c.4 doubled-braces trigger). Each iteration of
run_loop allocates a {thunk, env} closure pair via the
let-rec-name-as-value escape route. Sizes 10k / 100k / 500k.
rc/bump = 4.14x — materially worse than the 2.91x / 2.59x of
the linear/tree fixtures, exposing that closure work pays the
RC alloc tax twice (pair + env-struct).
- bench_hof_pipeline exercises poly-ADT instantiation and
indirect dispatch via fold_with_fn over List<a>. Sizes 100k /
1M / 3M elements. Ratios essentially match bench_list_sum,
confirming the 13b static-template-plus-ctor-inline design
has zero measurable overhead at this scale.
Baseline file extends from 31 to 47 metrics. The two new fixtures
build clean under all three allocators; the rc-arm build exercises
the per-type drop fn for the closure-pair, providing a tripwire
for any future 18c.4-class IR malformedness.
JOURNAL records both surprises (4.14x closure tax, ~zero HOF/poly
overhead) and explicitly notes the dispersion observation on
explicit_at_rc.p99 — three captures today (357.5 / 294.6 / 251.5)
confirm wide run-to-run variance on that fixture. Methodology
upgrade (n>=10 captures or tighter fixture) deferred to 21'c.
bench/run.sh fixtures array updated. bench/check.py needed no
changes — its parser handles the wider table by metric name.
74 lines
4.0 KiB
JSON
74 lines
4.0 KiB
JSON
{
|
|
"version": 1,
|
|
"captured": "2026-05-09",
|
|
"captured_via": "bench/run.sh -n 5",
|
|
"note": "Baseline for bench/check.py regression detection. Decision-10 thresholds (rc/bump <= 1.3x throughput, p99/median <= 5x latency) are LANGUAGE invariants, not regression-check tolerances. The tolerances below are tuned to absorb run-to-run noise on a quiet developer machine; they are NOT the correctness bar. To update after an intentional change, re-run bench/run.sh and replace the values, recording the reason in the JOURNAL entry that ships the baseline bump.",
|
|
|
|
"throughput": {
|
|
"bench_list_sum": {
|
|
"gc_s": { "baseline": 0.137, "tolerance_pct": 10 },
|
|
"bump_s": { "baseline": 0.046, "tolerance_pct": 10 },
|
|
"rc_s": { "baseline": 0.133, "tolerance_pct": 10 },
|
|
"gc_over_bump": { "baseline": 2.98, "tolerance_pct": 8 },
|
|
"rc_over_bump": { "baseline": 2.89, "tolerance_pct": 8 },
|
|
"gc_rss_kb": { "baseline": 103980, "tolerance_pct": 5 },
|
|
"bump_rss_kb": { "baseline": 97696, "tolerance_pct": 5 },
|
|
"rc_rss_kb": { "baseline": 193448, "tolerance_pct": 5 }
|
|
},
|
|
"bench_tree_walk": {
|
|
"gc_s": { "baseline": 0.103, "tolerance_pct": 10 },
|
|
"bump_s": { "baseline": 0.038, "tolerance_pct": 10 },
|
|
"rc_s": { "baseline": 0.095, "tolerance_pct": 10 },
|
|
"gc_over_bump": { "baseline": 2.71, "tolerance_pct": 8 },
|
|
"rc_over_bump": { "baseline": 2.50, "tolerance_pct": 8 },
|
|
"gc_rss_kb": { "baseline": 73260, "tolerance_pct": 5 },
|
|
"bump_rss_kb": { "baseline": 55208, "tolerance_pct": 5 },
|
|
"rc_rss_kb": { "baseline": 108956, "tolerance_pct": 5 }
|
|
},
|
|
"bench_closure_chain": {
|
|
"gc_s": { "baseline": 0.013, "tolerance_pct": 25 },
|
|
"bump_s": { "baseline": 0.007, "tolerance_pct": 25 },
|
|
"rc_s": { "baseline": 0.029, "tolerance_pct": 20 },
|
|
"gc_over_bump": { "baseline": 1.86, "tolerance_pct": 15 },
|
|
"rc_over_bump": { "baseline": 4.14, "tolerance_pct": 15 },
|
|
"gc_rss_kb": { "baseline": 13688, "tolerance_pct": 15 },
|
|
"bump_rss_kb": { "baseline": 15836, "tolerance_pct": 15 },
|
|
"rc_rss_kb": { "baseline": 39644, "tolerance_pct": 10 }
|
|
},
|
|
"bench_hof_pipeline": {
|
|
"gc_s": { "baseline": 0.134, "tolerance_pct": 10 },
|
|
"bump_s": { "baseline": 0.048, "tolerance_pct": 10 },
|
|
"rc_s": { "baseline": 0.136, "tolerance_pct": 10 },
|
|
"gc_over_bump": { "baseline": 2.79, "tolerance_pct": 8 },
|
|
"rc_over_bump": { "baseline": 2.83, "tolerance_pct": 8 },
|
|
"gc_rss_kb": { "baseline": 103788, "tolerance_pct": 5 },
|
|
"bump_rss_kb": { "baseline": 97448, "tolerance_pct": 5 },
|
|
"rc_rss_kb": { "baseline": 193640, "tolerance_pct": 5 }
|
|
}
|
|
},
|
|
|
|
"latency": {
|
|
"implicit_at_gc": {
|
|
"median_us": { "baseline": 96.4, "tolerance_pct": 15 },
|
|
"p99_us": { "baseline": 7130.0, "tolerance_pct": 20 },
|
|
"p99_9_us": { "baseline": 8131.2, "tolerance_pct": 25 },
|
|
"max_us": { "baseline": 8343.7, "tolerance_pct": 25 },
|
|
"p99_over_median": { "baseline": 73.92, "tolerance_pct": 20 }
|
|
},
|
|
"explicit_at_rc": {
|
|
"median_us": { "baseline": 213.9, "tolerance_pct": 15 },
|
|
"p99_us": { "baseline": 357.5, "tolerance_pct": 25 },
|
|
"p99_9_us": { "baseline": 404.1, "tolerance_pct": 25 },
|
|
"max_us": { "baseline": 413.0, "tolerance_pct": 25 },
|
|
"p99_over_median": { "baseline": 1.66, "tolerance_pct": 25 }
|
|
},
|
|
"implicit_at_rc": {
|
|
"median_us": { "baseline": 285.7, "tolerance_pct": 15 },
|
|
"p99_us": { "baseline": 407.1, "tolerance_pct": 20 },
|
|
"p99_9_us": { "baseline": 452.0, "tolerance_pct": 25 },
|
|
"max_us": { "baseline": 477.3, "tolerance_pct": 25 },
|
|
"p99_over_median": { "baseline": 1.43, "tolerance_pct": 20 }
|
|
}
|
|
}
|
|
}
|