perf: run duplicate-column merging to its own fixpoint in one pass#962
Open
rasros wants to merge 1 commit into
Open
perf: run duplicate-column merging to its own fixpoint in one pass#962rasros wants to merge 1 commit into
rasros wants to merge 1 commit into
Conversation
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.
Advances #937 (2DBinPacking).
What changed
mergeDuplicateColumnsnow iterates to its own fixpoint within a single invocation, folding a whole chain of duplicate columns in one pass instead of one pair per representative and relying on the round engine to re-invoke it.Why
The pass folds at most one duplicate per representative per invocation; a chain of
kduplicate columns therefore neededk−1presolve rounds, and every one of those rounds also re-ran subsume, dual-fix, strengthen and an incremental re-propagation over the whole model. On 2DBinPacking that was 16 rounds — the factor count reaches its fixpoint after round 2, and rounds 3–16 do nothing but re-merge one more column pair while every other pass rescans fruitlessly. Converging the chain internally collapses those rounds: 2DBinPacking presolve drops from ~694ms to ~400ms (under 0.5s at budget=0).Column duplication is a structural (row-support + coefficient) property, so re-propagation between the old rounds could not change which columns are duplicates; the internal fixpoint reaches the same merged problem in the same pairwise order the round engine did. Chained aggregates are reconstructed by undoing the merge batches in reverse (the order the round engine's
foldRightproduced).Testing