Skip to content

[std] Improve string hashing #1579

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

Closed
wants to merge 3 commits into from
Closed

[std] Improve string hashing #1579

wants to merge 3 commits into from

Conversation

MaxGraey
Copy link
Member

@MaxGraey MaxGraey commented Dec 14, 2020

Benchmark:

old str hash: 221.40000015497208 ms
new str hash: 186.04000005871058 ms

playground

  • I've read the contributing guidelines

@MaxGraey
Copy link
Member Author

Also I think better migrate to XXHash32: https://github.com/Cyan4973/xxHash

@dcodeIO
Copy link
Member

dcodeIO commented Dec 14, 2020

Yeah, FNV was meant as an easy way to get this going, but isn't necessarily the most efficient. Would expect to replace it eventually anyway, but should remain reasonably small.

@MaxGraey
Copy link
Member Author

Closing in favour of #1580

@MaxGraey MaxGraey closed this Dec 14, 2020
@MaxGraey MaxGraey deleted the improve-hash-str branch December 14, 2020 16:44
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.

2 participants