perf(pkg): make SAT decision search incremental - #16217
Draft
Alizter wants to merge 3 commits into
Draft
Conversation
Alizter
marked this pull request as ready for review
August 26, 2026 12:50
Alizter
marked this pull request as draft
August 26, 2026 17:21
Alizter
marked this pull request as ready for review
August 26, 2026 18:15
Alizter
marked this pull request as draft
August 26, 2026 22:27
Expose the current SAT decision level and cover a conflict that backjumps over an unrelated decision. Incremental deciders can use the observed decrease to invalidate cached traversal state. Signed-off-by: Ali Caglayan <alizter@gmail.com>
Maintain undecided variables in a linked list so the solver can choose and restore them without rescanning every variable. Freeze the variable set once decisions begin, which keeps list restoration valid across backtracking. Signed-off-by: Ali Caglayan <alizter@gmail.com>
Keep the package decider's depth-first frontier and visited roles between monotonic SAT decisions instead of walking again from the root. Reset the cached traversal when the exposed decision level shows that conflict analysis backtracked. Signed-off-by: Ali Caglayan <alizter@gmail.com>
Alizter
force-pushed
the
push-zwzrlwyyokpv
branch
from
August 26, 2026 22:40
e9b9a71 to
5bd403f
Compare
Member
|
Make sure that this is reviewed by somebody that understands SAT |
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
This separates the SAT contract from the two optimizations:
SAT-event speedup
Across ten real-world projects, complete
sat/solvetrace events were 2.83× faster by geometric mean for the four-platform solve and 2.80× faster for a single-platform solve. Every project improved in both configurations.These numbers measure time inside
sat/solve, not end-to-enddune pkg locktime. Each cell uses 10 measured runs after 2 warmups, with baseline and PR runs interleaved. Irmin was rerun with 20 measured runs after 3 warmups, pinned to a performance core with a 3 GHz preflight and median-frequency gate, because the original thermally throttled samples had excessive variance.Per-project benchmark results
Four-platform solve
Single-platform solve
Tests
dune build @check @fmt