Commit 20ef963
bench: add ChangelessWaste bound-version comparison
Adds a Criterion bench that runs four side-by-side bound implementations:
V1: simple input_weight * rate_diff
V2: V1 + resize trick for target-not-met, rate_diff >= 0
V3: V2 + slurp tightening for target-met-with-change, rate_diff >= 0
V4: V2 + LP-relaxed knapsack UB for rate_diff < 0 (matches current src)
Prints a round-count comparison table at the start of the run (helps see
relative bound tightness independent of constant-time overheads) and then
times each version on shared synthetic pools. Each Vn is a self-contained
metric type implementing BnbMetric so future tightenings can be added and
compared without disturbing the production code.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 7a9eebb commit 20ef963
2 files changed
Lines changed: 678 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments