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

switch MurmurHash3 to rapidhash ? #57235

Open
adienes opened this issue Feb 2, 2025 · 3 comments
Open

switch MurmurHash3 to rapidhash ? #57235

adienes opened this issue Feb 2, 2025 · 3 comments
Assignees
Labels

Comments

@adienes
Copy link
Contributor

adienes commented Feb 2, 2025

probably better as an issue than a zulip thread

rapidhash is a non-cryptographic hash I've seen picking up some steam in a lot of other ecosystems.

its predecessor, wyhash, is already the default hashing algorithm in Zig, Nim, and Go. and in comparison rapidhash is both faster and a higher quality hash.

I did a sloppy mockup (pure Julia) and found suggestions that hashing UInt64 can be already 30% faster than current Base.hash and since pretty much all the other hash methods end up calling hash(::UInt64) then performance improvements here could propagate a long way. And due to the higher quality hash, seeing fewer collisions can also be a big performance benefit for many data structures

It's also a keyed hash with secrets easy enough to generate on startup if desired, so it could help address #37166 in practice (although not fully cryptographically)

if this seems like something that could plausibly be merged in a 1.x release I'd be interested in working on this.

@adienes adienes added hashing performance Must go faster speculative Whether the change will be implemented is speculative labels Feb 2, 2025
@oscardssmith
Copy link
Member

We very specifically exclude outputs of hash (and rand) from our semver specification, so this is definitely feasible in 1.x.

@nsajko nsajko removed the speculative Whether the change will be implemented is speculative label Feb 3, 2025
@adienes
Copy link
Contributor Author

adienes commented Feb 3, 2025

#53855 would probably be pretty useful here

@JeffBezanson
Copy link
Member

Great, let's do it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants