Skip to content

[std] Improve string hashing#1579

Closed
MaxGraey wants to merge 3 commits intoAssemblyScript:masterfrom
MaxGraey:improve-hash-str
Closed

[std] Improve string hashing#1579
MaxGraey wants to merge 3 commits intoAssemblyScript:masterfrom
MaxGraey:improve-hash-str

Conversation

@MaxGraey
Copy link
Copy Markdown
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
Copy Markdown
Member Author

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

@dcodeIO
Copy link
Copy Markdown
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
Copy Markdown
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