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

Fix HashSet::union performance #66280

Merged
merged 1 commit into from
Nov 12, 2019
Merged

Fix HashSet::union performance #66280

merged 1 commit into from
Nov 12, 2019

Commits on Nov 10, 2019

  1. Fix HashSet::union performance

    Consider this example: small_set = 0..2, large_set = 0..1000.
    
    To efficiently compute the union of these sets, we should
    * take all elements of the larger set
    * for each element of the smaller set check it is not in the larger set
    
    This is exactly what this commit does.
    
    This particular optimization was implemented a year ago, but the
    author mistaken `<` and `>`.
    stepancheg committed Nov 10, 2019
    Configuration menu
    Copy the full SHA
    04a237b View commit details
    Browse the repository at this point in the history