Files
AILang/bench/baseline.json
T
Brummel 28ab56af7e audit embedding-abi-m5: milestone close — RATIFY gc_rss trio (evidenced) + DRIFT (one doc-honesty tidy); P2 bench noise causally exonerated, baseline pristine for it
Architect: Invariant 1 PASS (zero data-server in any compiler
crate/runtime; ail-embed its own workspace root); M3 frozen-layout
SSOT unmoved (the lone rc.c change 7bfa11e touched only the global
stats counters); rc.c header-comment honesty accurate. Drift =
[medium] DESIGN.md:2358-2360 stale "additive M4 concern" (PRE-
EXISTING — M4 retired; correctly scoped out of every M5 iter) +
[medium] DESIGN.md §"Embedding ABI" silent-drift (it asserts "no
shared mutable runtime state … data-race-free" but the now-atomic
global RC-stats fallback IS shared mutable state under concurrency;
M5 is AILang's first concurrent consumer) + [low] rc.c:88 "two
unconditional ++" imprecise → one doc-honesty tidy iteration
(embedding-abi-m5.tidy), same honesty axis, not split.

Bencher refuted my pre-audit "gc_rss allocator-orthogonal →
environmental" hypothesis WITH EVIDENCE: the 3x *.gc_rss_kb +32%
are genuine, deterministic, M5-attributable — 7bfa11e's atomic
split a branch in ailang_rc_alloc (reached by GC programs via
str.c int->str at print), spilling %r14/%rbx; a stale interior
list pointer in the new spill slot is conservatively retained by
Boehm, pinning a ~32 MB dead spine (collection #12 freed PRE 32 MB
vs HEAD 32 B); bisects exactly on the commit, IR byte-identical,
ail sha256-identical; RC/bump RSS dead-stable. bump_s + max_us are
pre-existing tracked-P2 noise (bump RC-orthogonal; max_us 1-sample
tail-jitter, PRE often worse, +65->+104% swing between runs) — NOT
M5.

RATIFY the gc_rss trio. Language reason (not effort): Decision 9 —
Boehm is explicitly transitional; AILang's committed model is RC +
uniqueness. The measurable cost of the correct, necessary,
user-approved swarm-safety fix is exclusively a Boehm
conservative-stack-scan false-retention artifact on the
transitional allocator (codegen-layout-fragile; no memory actually
leaked; RC/bump RSS dead-stable). Chasing it with an out-of-scope
codegen change invests in the path being migrated away from; the
committed RC path is unaffected. Selective baseline re-anchor:
bench/baseline.json lines 14/44/64 ONLY -> 137448/137768/137636
(bencher-confirmed steady-state); every other metric byte-pristine
(a wholesale --update-baseline would absorb the P2 noise and break
the established-envelope discipline). Re-run confirms the 3 now ok
at +-0.3%.

bump_s x2 + max_us x2: NO-ratify, causally exonerated, baseline
left pristine — identical disposition to the M2/M3/prelude-decouple
milestone closes.

Friction-harvest recorded (P2 flat-array-decision input):
host-per-tick-FFI ~= ~206 ns/tick at real EURUSD volume.

Ratify discipline: updated baseline JSON + this paired JOURNAL
ratify entry committed together (bench/baseline.json + the audit
journal + INDEX line). M5 closes after the doc-honesty tidy lands
and is Boss-verified.
2026-05-19 02:56:43 +02:00

94 lines
5.4 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. Tolerance convention: max-of-distribution metrics (e.g. *.max_us) get a wider band than percentile metrics (p99, p99_9) because the maximum of a 1000-sample tail-latency distribution has wider natural run-to-run dispersion than a percentile-of-distribution does — codified after the 21'd implicit_at_rc.max_us 25%->30% recalibration.",
"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": 137448, "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": 137768, "tolerance_pct": 5 },
"bump_rss_kb": { "baseline": 97448, "tolerance_pct": 5 },
"rc_rss_kb": { "baseline": 193640, "tolerance_pct": 5 }
},
"bench_compute_collatz": {
"gc_s": { "baseline": 0.057, "tolerance_pct": 12 },
"bump_s": { "baseline": 0.056, "tolerance_pct": 12 },
"rc_s": { "baseline": 0.056, "tolerance_pct": 12 },
"gc_over_bump": { "baseline": 1.02, "tolerance_pct": 10 },
"rc_over_bump": { "baseline": 1.00, "tolerance_pct": 10 },
"gc_rss_kb": { "baseline": 13624, "tolerance_pct": 15 },
"bump_rss_kb": { "baseline": 13860, "tolerance_pct": 15 },
"rc_rss_kb": { "baseline": 13880, "tolerance_pct": 15 }
},
"bench_list_sum_explicit": {
"gc_s": { "baseline": 0.139, "tolerance_pct": 10 },
"bump_s": { "baseline": 0.048, "tolerance_pct": 10 },
"rc_s": { "baseline": 0.152, "tolerance_pct": 10 },
"gc_over_bump": { "baseline": 2.89, "tolerance_pct": 8 },
"rc_over_bump": { "baseline": 3.14, "tolerance_pct": 8 },
"gc_rss_kb": { "baseline": 137636, "tolerance_pct": 5 },
"bump_rss_kb": { "baseline": 97636, "tolerance_pct": 5 },
"rc_rss_kb": { "baseline": 142424, "tolerance_pct": 8 }
}
},
"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": 30 },
"p99_over_median": { "baseline": 1.43, "tolerance_pct": 20 }
}
}
}