4 ms·
How does performance compare with XXhash, possibly the current leader in the non-cryptographic hash category?
by loeg 9y ago
How does performance compare with XXhash, possibly the current leader in the non-cryptographic hash category?
- zuzun 9y agoThe benchmarks on the xxHash Github page were done on a 32-bit system using an old Visual C++ compiler. Of course you can beat hash functions that were explicitly designed for modern 64-bit architectures. The Core 2 lacks the CRC instruction introduced by the SSE 4.2 extension, which is the main reason Google wrote their hashes.
- bla2 9y agoxxHash has a 64-bit version.
- zuzun 9y agoAll modern hashes are designed for 64-bit architectures and some even rely on recent instruction sets. So a benchmark on an old 32-bit CPU isn't indicative of the performance you'll see on a modern processor, e.g. Metrohash will definitely not be 5x slower than xxHash.
- loeg 9y agoNot sure what you're trying to say. I'm asking for an apples-to-apples comparison here. Using one figure from a random CPU on github and comparing it to another figure from a different random CPU on github is not an apples to apples comparison. I don't think anyone claimed xxhash would be 5x faster than metrohash. (Maybe you are getting the 5x number from metrohash's claim that it is 5x faster than siphash?)
- loeg 9y agoLook at XXH64.
- rurban 9y agoXXhash is only fast with digest workloads, not hash tables. There the hash function needs to be fast and small, XXhash is too big and trashes the icache. The current leaders are on my smhasher site, https://github.com/rurban/smhasher/ https://github.com/rurban/smhasher/
- loeg 9y agoThank you!