Skip to content

chore(pumpkin-core): Avoid unnecessary allocations - #573

Merged
ImkoMarijnissen merged 3 commits into
mainfrom
chore/sparse-set-avoid-allocation
Sep 17, 2026
Merged

ImkoMarijnissen merged 3 commits into
mainfrom
chore/sparse-set-avoid-allocation

Conversation

@ImkoMarijnissen

@ImkoMarijnissen ImkoMarijnissen commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Small optimisations to avoid reallocations

@ImkoMarijnissen ImkoMarijnissen changed the title chore(pumpkin-core): Avoid unnecessary allocation in sparse set chore(pumpkin-core): Avoid unnecessary allocations Sep 17, 2026

@EmirDe EmirDe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch. I made a small change, now the temp_nogood is cleared at the start of the function call, rather than before every use. If you do not like the change, then revert it.

Another unrelated thing I noticed "is_extended_unit_propagation": I found the name a bit odd. Unit propagation comes from unit clauses, and now we are saying "extended unit nogood". It could work but not sure if ideal.

@ImkoMarijnissen
ImkoMarijnissen merged commit d4fd04b into main Sep 17, 2026
9 checks passed
@ImkoMarijnissen
ImkoMarijnissen deleted the chore/sparse-set-avoid-allocation branch September 17, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants