ci: extend benchmark gate to G7 — allocation contracts and stdlib-parity ratios - #28
Merged
Merged
Conversation
…ity ratios Beyond parallel ratios, the gate now locks the library's other performance contracts: G4 Sort pipeline <=2.5x direct slices.SortFunc (kills adapter/O(n^2) regressions; measured 1.17-1.22x), G5 DistinctBy <=0.6x Distinct time and <=5% of its allocations (measured 0.24-0.27x and 0.3%), and two deterministic allocation gates via testing.AllocsPerRun — G6 Take on 100k <=50 allocs (reservoir O(1); measured exactly 6, materialize-all regression would be orders more) and G7 Limit(2).ToSlice() on 100k <=200 allocs (lazy short-circuit; measured exactly 12). Proposal A6 (multi-section speedup) is documented as deliberately excluded from time gates: its speedup is core-count dependent (16 workers need 16 cores to beat 4), so it cannot be machine-independent; correctness stays pinned by TestParallelV2_MidChainParallelReopens. AGENTS.md gate table updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the benchmark gate from 3 to 7 checks — the library's other performance contracts were unprotected (a Sort/DistinctBy/Take/laziness regression would pass CI silently).
New gates
slices.SortFuncDistinctByvsDistinctTakeon 100kLimit(2).ToSlice()on 100kAllocation gates (
testing.AllocsPerRun) are hardware-free and zero-flake by construction — the strongest gate kind available.Documented exclusion
Proposal A6 (multi-section 16+2 speedup) is deliberately NOT a time gate: its speedup is core-count dependent (16 workers need 16 cores to beat 4) and thus cannot be machine-independent. Multi-section correctness stays pinned by
TestParallelV2_MidChainParallelReopens.Verification
-racesuite green; gate runs in ~1.8s