fix(test): scaling-ratio form for the wide-flat linearity guard#934
Merged
Conversation
An absolute wall-clock bound conflates machine speed with complexity class: the gcc-13-ARM ASan CI leg runs this extraction ~200x slower than clang at measured-perfectly-linear complexity (27.1/54.2/108.3/ 214.8s for 50k/100k/200k/400k siblings) and flunked a 30s bound on LINEAR code — the leg has always been the slow one (71min in the last fully green run, unchanged since). Assert the complexity class instead: extract the same comment-sibling fixture at 20k and 400k lines and bound the growth ratio at 40x. Calibrated from measurement, not models — the ASan builds carry a large linear per-line baseline that dilutes small-growth ratios (at 8x growth the known-quadratic pre-merge walk measured 22.4x and slipped under a 24x bound), while at 20x growth linear code measures ~20x on both toolchains and the quadratic walk measures 64x. Verified RED (64.4x, fails) against the pre-merge walk_defs and GREEN (19x) on the fix; the test now prints both timings unconditionally for future triage. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
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.
The wide-flat guard's absolute 30s wall-clock bound failed on ubuntu-24.04-arm — that leg's gcc-13 ASan build runs extraction ~200x slower than clang at measured-perfectly-linear complexity (container-verified: 27.1/54.2/108.3/214.8s for 50k/100k/200k/400k siblings; the leg took 71min in the last fully-green run too — pre-existing).
Replaced with a scaling-ratio assertion (complexity class, machine-independent): same fixture at 20k and 400k lines, growth ratio bounded at 40x. Parameters calibrated from measurement — linear code measures ~20x on both toolchains, the known-quadratic pre-merge walk measures 64.4x (verified RED against it; smaller growth factors let it slip under the bound). Timings now print unconditionally for triage.