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

unordered_map,unordered_set: Simplify excess list size computation #415

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

stotko
Copy link
Owner

@stotko stotko commented Apr 10, 2024

In #414, the excess list size computation has been fixed for very low capacities. However, the use of std::max is not needed anymore due to the fix. Remove this expression to simplify the computation of the size.

While at it, also make the estimate for the expected collisions slightly more conservative by always rounding up the computed value.

@stotko stotko added the bug label Apr 10, 2024
@stotko stotko added this to the 2.0.0 milestone Apr 10, 2024
Copy link

codecov bot commented Apr 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.37%. Comparing base (b7a350e) to head (202c516).

❗ Current head 202c516 differs from pull request most recent head 5062aee. Consider uploading reports for the commit 5062aee to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #415   +/-   ##
=======================================
  Coverage   97.37%   97.37%           
=======================================
  Files          31       31           
  Lines        2512     2512           
=======================================
  Hits         2446     2446           
  Misses         66       66           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stotko stotko force-pushed the excess_count_simplify branch from 202c516 to 5062aee Compare April 10, 2024 07:28
@stotko stotko merged commit 965a29f into master Apr 10, 2024
59 checks passed
@stotko stotko deleted the excess_count_simplify branch April 10, 2024 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant