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

Optimize set union and intersection #130

Merged
merged 1 commit into from Nov 11, 2019

Conversation

@stepancheg
Copy link
Contributor

stepancheg commented Nov 11, 2019

For intersection: take the smaller set, and check each element
exists in the larger set.

For union: take the larger set, and append missing elements from
the smaller set.

Similar optimizations exist in Rust's HashSet.

For intersection: take the smaller set, and check each element
exists in the larger set.

For union: take the larger set, and append missing elements from
the smaller set.

Similar optimizations exist in Rust's `HashSet`.
@Amanieu

This comment has been minimized.

Copy link
Collaborator

Amanieu commented Nov 11, 2019

@bors r+

Thanks!

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 11, 2019

📌 Commit d5cc5a8 has been approved by Amanieu

bors added a commit that referenced this pull request Nov 11, 2019
Optimize set union and intersection

For intersection: take the smaller set, and check each element
exists in the larger set.

For union: take the larger set, and append missing elements from
the smaller set.

Similar optimizations exist in Rust's `HashSet`.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 11, 2019

⌛️ Testing commit d5cc5a8 with merge 2c60ecb...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 11, 2019

☀️ Test successful - checks-travis
Approved by: Amanieu
Pushing 2c60ecb to master...

@bors bors merged commit d5cc5a8 into rust-lang:master Nov 11, 2019
2 checks passed
2 checks passed
Travis CI - Pull Request Build Passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.