Windows QoS gate: Hoard vs the system heap (geomean floor 1.25x) - #120
Merged
Conversation
…rating) Now that Windows benchmark output is captured, Windows can finally be performance-checked, not just crash-checked. The comparison allocators (mimalloc/jemalloc) are not built on Windows, so the only other allocator present is the Windows system heap -- which is exactly the heap Hoard replaces, and which the benchmarks already measure as their uninjected baseline. So the natural, meaningful Windows question is "am I at least as fast as what I replace?", across the whole suite. scripts/qos_windows.py parses the baseline and Hoard result files and reports the per-benchmark ratio plus the GEOMETRIC MEAN. Each benchmark runs once per job, so a single ratio is noisy (larson especially, being false-sharing sensitive), but the geomean over ten benchmarks is steady -- so we gate on the geomean and merely report the rest. First measurement: 1.55x geomean, Hoard faster on 8 of 10, tying sh8bench and trailing only single-run larson. REPORT-ONLY for now: gathering geomean variance across runs before committing a hard floor, so this does not repeat the macOS gate's false-positive. It emits a ::warning:: if the geomean falls below a provisional 1.15x meanwhile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Hoard results file is plain ASCII (written by the benchmark via fprintf), but the baseline file is written by PowerShell's Tee-Object, which defaults to UTF-16 on Windows. Python read it as garbage, so no baseline benchmarks parsed and the comparison had nothing in common. Detect the encoding from the BOM (or an embedded NUL) and decode accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Calibrated from four runs of unchanged code: geomean(hoard/system) measured 1.54, 1.55, 1.59, 1.65. Individual benchmarks are noisy (larson 0.87-0.90, sh8bench 0.94-1.00, cache-thrash 1.66-1.94), but the geomean over ten benchmarks barely moves -- which is exactly why the gate keys on it. Floor is 1.25x: ~19% below the worst observed geomean, so it will not flake, while still tripping if Hoard ever falls toward parity with the heap it replaces (a genuine, broad regression). Per-benchmark ratios are still printed, so a single-benchmark regression is visible even when the geomean holds. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
|
Now gating (updated from report-only). Calibrated across five runs of unchanged code: geomean(hoard/system) = 1.55, 1.54, 1.65, 1.59, 1.44. Individual benchmarks are noisy (larson 0.87–0.90, sh8bench 0.94–1.00, cache-thrash 1.66–1.94), but the geomean barely moves — which is the whole point of keying on it. Floor is 1.25×: ~13% below the lowest observed (1.44), so it won't flake, while still tripping if Hoard ever falls toward parity with the heap it replaces. Note the 1.44 run vindicates the conservative choice — a snugger 1.40 floor would have nearly failed a perfectly healthy run. Current run: PASS at 1.44×. |
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.
Now that Windows benchmark output is captured (#119 + alloc8#14), Windows can be performance-checked, not just crash-checked.
Design
The comparison allocators (mimalloc/jemalloc) aren't built on Windows, so the only other allocator present is the Windows system heap — which is exactly the heap Hoard replaces, and which the benchmarks already measure as their uninjected baseline. So the meaningful Windows question is "am I at least as fast as what I replace?", across the whole suite.
scripts/qos_windows.pyparses the baseline and Hoard result files and reports the per-benchmark ratio plus the geometric mean. Each benchmark runs once per job, so a single ratio is noisy (larson especially, being false-sharing sensitive) — but the geomean over ten benchmarks is steady, so the gate keys on the geomean and merely reports the rest.First measurement
Hoard is faster on 8 of 10, ties sh8bench, and trails only single-run larson.
Report-only, for now
Gathering geomean variance across runs before committing a hard floor — I'm not going to repeat the macOS gate's false-positive (which failed a healthy merge because a runner was degraded for the whole job). It emits a
::warning::if the geomean drops below a provisional 1.15x in the meantime.Verified locally: pass/fail/warn paths all behave (exit 1 + message on regression, exit 0 on pass,
::warning::on report-only).🤖 Generated with Claude Code