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

use hashbrown as internal hashmap #146

Merged
merged 1 commit into from
Jan 9, 2024
Merged

use hashbrown as internal hashmap #146

merged 1 commit into from
Jan 9, 2024

Conversation

CrockAgile
Copy link
Collaborator

@CrockAgile CrockAgile commented Jan 7, 2024

hashbrown is the same hashmap used by the std library. however the std library uses some safer defaults (denial-of-service resistant hashing) and is a few versions behind.

these differences may lead to performance loss when not required.

using hashbrown in BNF improved all benchmarks on my local machine by 2-25%.

for this reason, it seems worth BNF adopting hashbrown as its default hasher.

the denial-of-service resistance is not required for BNF's use cases

@CrockAgile CrockAgile self-assigned this Jan 7, 2024
@coveralls
Copy link

Coverage Status

coverage: 98.05% (+0.09%) from 97.956%
when pulling 9d81ff0 on hashbrown
into f2da5f3 on main.

Copy link
Owner

@shnewto shnewto left a comment

Choose a reason for hiding this comment

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

✨ ✨ ✨ ✨

@CrockAgile CrockAgile merged commit bc2ef5e into main Jan 9, 2024
10 checks passed
@CrockAgile CrockAgile deleted the hashbrown branch January 9, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants