Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add faster semi and antijoin #2641

Merged
merged 11 commits into from
Mar 8, 2021
Merged

Add faster semi and antijoin #2641

merged 11 commits into from
Mar 8, 2021

Conversation

bkamins
Copy link
Member

@bkamins bkamins commented Mar 4, 2021

Fixes #2340

This is the last PR for making joins faster.
Here are the benchmarks against 0.22.5 release. As before we are either much faster or comparable.
semi_022_5.txt
semi_pr.txt

The only small problem is code duplication. I would prefer to avoid it, but first I wanted to make sure we have thing correct and fast. The problem is that duplicate methods get different arguments and are minimally different (in other words: we use exactly the same high level logic, but collect and pass around different information as the resulting join is different since it involves only left table).

@bkamins bkamins requested a review from nalimilan March 4, 2021 18:36
Copy link
Member

@nalimilan nalimilan left a comment

Choose a reason for hiding this comment

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

Impressive timings!

@bkamins
Copy link
Member Author

bkamins commented Mar 5, 2021

I have refactored the code following your suggestions. The code is now faster in some specific cases (as I was able to switch from Dict to Set for some code paths so less memory is used). This mostly affects semijoin and antijoin when left and right tables have approximately similar length.

CI fails because of breaking changes in 1.7. I will fix it in separate PRs.

@bkamins bkamins added this to the 1.0 milestone Mar 5, 2021
@bkamins bkamins merged commit 6d5ae35 into main Mar 8, 2021
@bkamins bkamins deleted the bk/semijoin branch March 8, 2021 19:22
@bkamins
Copy link
Member Author

bkamins commented Mar 8, 2021

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Faster joins meta issue
2 participants