Repository navigation
release: v0.6.0 — separation-effort tiers + PreparedParts + remnant densification - #4
Merged
Merged
Conversation
… tests
Performance + density work (docs/04-performance-remediation-plan.md):
- perf(build): [profile.dev] opt-level=2 — the engine is compute-bound, so
`cargo test` ran ~12x slow at opt-level 0 (golden test 633s -> 51s).
Byte-identical (opt-level is codegen-only, no IEEE change); goldens unchanged.
- feat(sep): SeparationEffort knob (NestConfig field + Python separation_effort=).
* Fast: area-conservation hopeless-skip + reduced separator budget for
over-subscribed packs — 15x (NFP) / 18x (sampling) on the mixed-13 pack at
<=1 part cost. Opt-in; Full default byte-identical; two new golden cases.
* Max: densification/compaction — shrink the sheet along the slack axis and
re-separate the whole layout to close inter-part gaps, maximizing the usable
remnant (v1: +2.8pp remnant on a cone case; the local search plateaus, and a
stronger global search is the documented next step).
- feat(api): PreparedParts (prepare()/nest_with_prepared() + Python
ironnest.prepare()) — reuse the container-independent item import + O(P^2) NFP
table across calls (part-in-part): 11.8x on 15 containers, byte-identical
(test prepared_equals_nest_with_config_byte_for_byte).
- perf(nfp): buffer hoisted to one clone per type in place_pass; candidates()
capacity hints. Byte-identical.
- diagnostic examples: perf_diag, prepared_bench, density_probe, density_remnant.
All 77 optimizer tests pass; workspace clippy -D warnings clean (incl.
--features parallel); cross-platform golden re-blessed for the new Fast cases
(existing cases byte-identical, verified by direct snapshot diff).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…sify refill Builds on the separation-effort tiers (dcfafc7). Goal: maximize the usable remnant (a clean free strip at the sheet end), not raw utilization. Reviewed + verified (determinism-auditor CLEAN; 77 tests pass; clippy -D warnings clean). - feat(api): NestConfig.column_weight (Python `column_weight=`, default 10) — the LBF horizontal weight for NFP candidate ranking (cost = w*x_max + y_max). The historical 10 over-forces strict left-columns; w=3 closes vertical gaps between irregular parts. Default 10 is bit-identical, and this REMOVES the temporary IRONNEST_XW env hook that dcfafc7 accidentally shipped (a latent placement-path env read). Exposes DENSITY_COLUMN_WEIGHT=3 + nest_with_prepared_weighted. - feat(multistart): remnant-first keep-best (NestScore: max placed area, then min used_x_max, then min used_y_max, earliest k on tie) across ALL multi-start entry points + the densify keep-best. Deterministic: all total_cmp over slotmap-order sums + libm-deterministic bboxes; restarts=1 stays byte-identical. Re-blessed the multistart-mixed golden (the only case with area-ties). - feat(sep): Max densify now uses the remnant-first score + a post-densify NFP contact refill (obstacles_from_layout + budget=0 place_pass). Measured on the cone+square remnant probe: remnant 53.0% -> 57.0% (max_x 112.8 -> 103.4). - test: nfp-max-densify golden case pins the Max tier's cross-platform determinism; fixed a stale multistart-overflow comment. Recommended for remnant jobs: strategy="nfp", column_weight=3, restarts>=8, separation_effort="max". Byte-stable default: 10 / 1 / "full". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… prepare) Version 0.5.0 -> 0.6.0. README documents the new density/speed knobs (strategy="nfp", restarts, separation_effort full/fast/max, column_weight) and the prepare()/PreparedParts part-in-part reuse. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
parallel_multistart_equals_independent_sequential_best (--features parallel only, so it slipped past local `cargo test`) reconstructed the sequential best-of-K with an OLD area-only argmax, which no longer matches the engine's remnant-first NestScore keep-best (equal-area starts now break the tie on used_x_max). The engine is consistent (parallel and sequential both use keep_best_start); only the test's mirror was stale. Add a doc(hidden) multistart_start_scored hook returning each start's exact NestScore tuple (placed_area, used_x_max, used_y_max) so the test mirrors the engine's reduction exactly. Passes under --features parallel. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
v0.6.0 — density & speed knobs (opt-in, byte-identical defaults)
Builds on v0.5.0's exact-NFP mode. All new behaviour is opt-in; default arguments stay
byte-identical, so the cross-platform determinism contract holds (goldens re-blessed only where a
placement deliberately changed).
Features
separation_effort(NestConfigfield + Python kwarg):"fast"— area-conservation hopeless-skip + reduced separator budget: ~15× (NFP) / 18×(sampling) on over-subscribed packs, ≤1 part cost.
"max"— a densification/compaction pass (shrink toward a corner + full-layout GLSre-separate + NFP refill) that maximizes the usable end remnant (measured 53% → 57% on a
cone+square probe).
PreparedParts(prepare()/nest_with_prepared()+ironnest.prepare()): reuse thecontainer-independent item import + O(P²) pairwise NFP table across calls — 11.8× on a 15-container
part-in-part run, byte-identical.
column_weight(NestConfigfield + kwarg, default 10): the LBF horizontal weight for NFPcandidate ranking;
3closes vertical gaps between irregular parts.NestScore: max placed area, then minused_x_max/used_y_max, earliest-k on tie) across all entry points.Perf / dev
[profile.dev] opt-level = 2— the engine is compute-bound, socargo testran ~12× slow atopt-level 0 (golden test 633 s → 51 s). Byte-identical (codegen-only).
Determinism
placement path; all keep-best via
total_cmp; restarts=1 byte-identical).FastandMaxtiers cross-platform; only themultistart-mixedcase wasre-blessed (area-tie → remnant-first tie-break).
-D warningsclean (incl.--features parallel).Recommended for remnant jobs
strategy="nfp",column_weight=3,restarts>=8,separation_effort="max".Byte-stable default:
column_weight=10,restarts=1,separation_effort="full".See
docs/04-performance-remediation-plan.md.🤖 Generated with Claude Code