[PERF] simplify conditional_join result materialization (blocked by #1633) - #1638
Draft
samukweku wants to merge 4 commits into
Draft
[PERF] simplify conditional_join result materialization (blocked by #1633)#1638samukweku wants to merge 4 commits into
samukweku wants to merge 4 commits into
Conversation
samukweku
force-pushed
the
issue-1632-result-materialization
branch
from
August 20, 2026 03:11
503706e to
8aecf4e
Compare
samukweku
force-pushed
the
issue-1627-anti-join
branch
from
August 20, 2026 03:11
50fc7da to
1416b3e
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.
Dependency
Blocked by #1633. Do not merge this PR until #1633 has merged. This PR is intentionally based on issue-1627-anti-join so the benchmark and refactor cover left_anti and right_anti. After #1633 merges, retarget/rebase this branch onto dev and mark this PR ready for review.
Closes #1632.
Summary
ELI5
A join first finds matching row numbers, then builds a new table from them. The old code rebuilt that table differently for every join type. This change creates one row-number plan per side; -1 means that side has no row and pandas supplies the correct missing value.
Performance
Apple Silicon, Python 3.14.5, pandas 3.0.3, 50,000 rows, sparse duplicate-key matches, five repetitions. Timing and tracemalloc memory passes ran separately using a one-off local harness that is not included in this PR.
Nine of ten sampled cases improved; narrow outer was effectively flat (4.72 ms to 4.74 ms). Peak traced allocation fell in eight cases, was effectively flat for wide outer/right_anti, and rose 3.7% for narrow outer because one combined integer row indexer remains live. The broader 48-case join-type/density/width run found no material runtime regression. End-to-end timing is matching-dominated and stayed within the unchanged inner-path noise band.
Verification