Repository navigation
perf(scoring): reuse emptied output-link buckets across notifications - #281
Merged
Merged
Conversation
Join, complement, projection and self-join nodes keep one bucket of output handles per input row. Retracting the row dropped its bucket and re-inserting it allocated a new one, so every move that re-joined rows allocated two small vectors per join output pair: about 195k allocations in one group_ruin gate run. The nodes now hold their buckets in a Links table that hands emptied buckets back to a pool, so steady-state notification allocates nothing. A counting-allocator test pins it (128 allocations over 64 moves before, 0 after). Besides the allocations themselves, the churn tied scoring's memory layout to whatever the selector freed last: the zero-regression gate's group_ruin case read 6.3% more simulated D1 misses after the move selectors stopped freeing their per-step tables, with identical instructions. With the pool, group_ruin runs 7.2% fewer instructions than 0.31.3 at +0.6% D1 misses, and route_rows 7.8% fewer instructions at -3.6% D1 misses.
blackopsrepl
force-pushed
the
perf/pooled-link-buckets
branch
from
November 28, 2026 05:55
63ebcb2 to
145def1
Compare
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.
Change and Purpose
Join, complement, projection and self-join nodes kept one bucket of output handles per input row and dropped it whenever the row was retracted, so every move that re-joined rows allocated two small vectors per output pair (about 195k allocations in one
group_ruingate run). The buckets now live in aLinkstable that pools emptied buckets, so steady-state notification allocates nothing.The churn also coupled scoring's memory layout to the selectors' allocations: the full gate of
6421406eagainst v0.31.3 failed onlygroup_ruinon simulated D1 misses (+6.3%, identical instructions) because the selectors stopped freeing per-step tables that scoring used to reuse.Verification
crates/solverforge-solver/tests/join_link_reuse.rs: 64 re-joining moves allocate 0 times (128 on main).group_ruinIr -7.2%, D1 +0.6%;route_rowsIr -7.8%, D1 -3.6%.make lintandmake testpass (1664 tests).