Repository navigation
Commit 975dc76
committed
fix(test): constant def count in the wide-flat scaling fixture
The guard's sparse defs scaled WITH the input (one per 2000 lines), so
the fixture inherited a slice of the separate per-def sibling-scan cost
(O(defs x siblings) — its own tracked finding): an n^2/2000 term that
is negligible on clang-macOS but dominant enough on windows-CLANG64
ASan to push LINEAR walk code to a 43x measured ratio, over the 40x
bound. Ten defs at fixed positions regardless of size keep the
anti-vacuous breadth check while the sibling-scan term stays 10 x n =
linear. Measured after the change: fixed code 22x, pre-merge quadratic
walk 339x — the discriminator now has ~2x headroom on the green side
and ~8x on the red side across all three toolchains measured.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>1 parent 4630d2a commit 975dc76
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3418 | 3418 | | |
3419 | 3419 | | |
3420 | 3420 | | |
| 3421 | + | |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
3421 | 3427 | | |
3422 | 3428 | | |
3423 | | - | |
| 3429 | + | |
3424 | 3430 | | |
3425 | 3431 | | |
3426 | 3432 | | |
| |||
3467 | 3473 | | |
3468 | 3474 | | |
3469 | 3475 | | |
3470 | | - | |
3471 | | - | |
| 3476 | + | |
| 3477 | + | |
3472 | 3478 | | |
3473 | 3479 | | |
3474 | 3480 | | |
| |||
0 commit comments