Issue #3030: check.gate is 2.47 % over its perf row after the bounds walk keeps only results: raise the row or make the walk cheaper

Open and answer this issue on GitHub.

decision, ci · opened 2026-12-01 · updated 2026-12-01 · 0 comments

Question

The perf gate on check.gate (check --bounds scripts/gate.nika) is 2.47 % over its row in benches/perf.baseline. The limit is 2 %. The rise comes from “Keep only results in nikaia.proofs: the bounds walk adopts a check’s entry” (#2971) together with develop. Do we raise the row by the measured amount, or does the batch stay local until the walk costs less?

Found while #2971 (local batch 492b62d6d..6692d5187, not pushed). By the rule in docs/supervisor.md (“A baseline is raised only by the owner’s decision”, owner, 2026-11-30), nobody has raised the row.

Measurements

Instruction counts from callgrind, never time (docs/measuring.md):

run check.gate against the row 5350943716
CI, earlier develop (before this batch) – about +1.5 %
CI, d12894b2f (batch) 5476770902 +2.35 %
CI, 6692d5187 (batch + develop merged) 5483228666 +2.47 %
local fast profile, origin/develop 26f7dc9c4 3,066.4 M –
local fast profile, batch d12894b2f 3,091.9 M +0.83 % against develop

Locally the batch adds +25 M instructions (+0.83 %). Develop already takes about 1.5 % of the 2 % headroom on CI, so the batch has to lose about 10 M more (about 0.35 %) to pass.

Where the +25 M go (QA round, read in crates/nikaia-std/src/compiler/bounds_walk.nika and proofs_answers.nika):

Tried and not committed: proofs_known returns (asked, key) so the walk looks up once (−3.5 M), and a dedupe bucketed by length instead of the HashSet (−1 M more). Together −4.5 M (−0.15 %), not enough.

Options

A. Make the walk cheaper, keep the row. Commit the −4.5 M from above. Write each kept text once and hand it on, instead of writing it twice. Do one lookup per kept question instead of three. Estimate: −11 M to −12 M in total, about +0.45 % locally, so about +1.95 % to +2.0 % on CI.

B. Raise the row by the measured amount (5350943716 → about 5395 M, +0.83 %). The work buys what was asked: every proved answer is kept, and nothing that is not proved is taken over.

C. A, then B for the rest. Build A first. Whatever is still over the limit afterwards is raised, with the remaining measurement in the commit message.

D. Do nothing. The batch stays local, and the lane stops until something else lowers check.gate.

Other projects: rustc’s perf CI (perf.rust-lang.org) treats a measured, explained regression in exchange for a feature as an accepted triage call (“acceptable, justified”); it never raises silently.

Recommendation

C. First fix the duplicated bookkeeping (A); it is a real cost with no benefit. A raise is accepted only for whatever is left after that, with its measurement. Risk: if A brings little, C ends up as B.


Generated by Claude Code

Back to Open Issues