Skip to content

Commit 20ef963

Browse files
evanlinjinclaude
andcommitted
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

File tree

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ criterion = "0.5"
2929
[[bench]]
3030
name = "coin_selector"
3131
harness = false
32+
33+
[[bench]]
34+
name = "changeless_waste_bounds"
35+
harness = false

0 commit comments

Comments
 (0)