Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Use xxh3 instead of murmurhash3 for better performance of hashing #11738
Link to the xxHash release which suports xxh3: https://github.com/Cyan4973/xxHash/releases/tag/v0.7.0
Link to the current implementation of Mumur hashing in Scala: https://github.com/scala/scala/blob/2.12.x/src/library/scala/util/hashing/MurmurHash3.scala#L181-L201
The problem is that xxHash on the JVM isn't, in the implementations I've tested, faster than MurmurHash3. I haven't explored MetroHash, but it's 64 bits (at a minimum) anyway, and it's CPU-specific; I'm not sure how well it performs on alternate architectures (e.g. AMD).
If someone wanted to do the work of benchmarking the latest hash variants and got promising results we could switch again, but last time we did this MurmurHash2 (actually--3 wasn't out yet) was the best available, all things considered. (Including better than xxHash at the time.)