Repository navigation
release: v0.6.2 — Max densify performance for production nfp path - #5
Merged
Merged
Conversation
Max multi-start previously densified every start then discarded losers, multiplying the dominant densify cost by K. Explore at Full, NestScore keep-best, densify only the winner. Also skip empty densify refills and return the prior container from swap_container to avoid per-step clones. K=1 Max / Full / Fast goldens unchanged.
Align densify separate_layout with SEP_CONFIG (was 200×6 strikes, now the same 150×4 as Full leftover sep). Remnant held on the cone+square corpus (56.8%, max_x 103.6); Max K=1 wall 2570→1306 ms. Add NestScore plateau early-stop (no win when score improves until the end; cheap safety net). Goldens unchanged.
Layout::restore never reloads the container, but save() cloned it on every separator improvement, try_insert, and densify keep-best. Add save_poses/ restore_poses (items + CDE only) and use them on the fixed-container path. Byte-identical (goldens hold); densify wall is sample-bound so the win is mostly avoided waste / allocation pressure.
Densify multiplies its sep budget × shrink steps; Full was overkill once NestScore keep-best + 1% shrinks were in place. Use SEP_CONFIG_FAST for separate_layout — Max w3 K=1 densify ~2570→150 ms with remnant held (56.8%, max_x 103.6); goldens unchanged. Also use difference_query on feasible_region (zero-area drop only, no Booth canonicalize): candidates re-sort by cost so the multiset is byte-identical while skipping per-placement full canonicalization.
Max previously ran Full leftover insertion then densify — on over-sub packs that is the ~97 s hopeless-insert tax. Use Fast leftover (area-skip + reduced budget) under Max, then densify as before. Densify-once multi- start explores at Fast too. All-fit remnant held; goldens unchanged.
Speed up separation_effort=max under the station defaults (strategy=nfp, restarts=8, column_weight=3) without changing Full/Fast defaults or goldens: - Densify-once multi-start: explore at Fast leftover, densify NestScore winner only (cuts densify from K× to 1×) - Max leftover insertion uses Fast budgets + area-skip (avoids Full's over-sub tax); densify sep budget aligns with SEP_CONFIG_FAST - Pose-only layout snapshots on sep/densify (skip unused container clone) - Query-path NFP difference_query (no per-placement Booth canonicalize) Measured on cone+square remnant corpus: Max w3 K=8 ~20 s → ~190 ms with remnant held (56.8%, max_x 103.6). docs/04 §4e.
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.
Summary
Speeds up the production nesting path (
strategy=nfp,restarts=8,separation_effort=max,column_weight=3) while keeping Full/Fast defaults and goldens byte-identical.restarts>1explores at Fast leftover cost, NestScore keep-best, densifies only the winnerseparate_layoutusesSEP_CONFIG_FAST(was much heavier)difference_query: zero-area drop only on feasible-region queries (candidates re-sort)Measured (cone+square all-fit remnant corpus): Max w3 K=8 ~20 s → ~190 ms, remnant held (56.8%, max_x 103.6). See
docs/04§4e.Test plan
cargo fmt --all --checkcargo clippy --workspace --exclude ironnest-py --all-targets --locked -- -D warningscargo test --workspace --exclude ironnest-py --lockedcargo test --workspace --exclude ironnest-py --release --lockedcargo test -p ironnest-optimizer --features parallel --release --lockedRelease
Workspace version 0.6.2. After merge: tag
v0.6.2to publish wheels viawheels.yml.