rurban/smhasher
View on GitHub ↗ ★ 2,184 C++
Hash function quality and speed tests
67 mentions on Hacker News by 35 people: 3 stories, 64 comments · first 2015-05-28 · latest 2026-01-21
20082026
-
…[4]. [1] https://docs.nvidia.com/cuda/nvjpeg/index.html [2] https://github.com/CESNET/GPUJPEG [3] https://github.com/rurban/smhasher [4] https://github.com/kopia/kopia/issues/692
comment by zigzag312 · 2026-01-21 · in Libbbf: Bound Book Format, A high-performance container for comics and manga -
I'm also naive in this space, but I rely on rurban's smhasher for this: https://github.com/rurban/smhasher . There's also smhasher3: https://github.com/fwojcik/smhasher3/tree/main/results
comment by camgunz · 2025-05-18 · in New high-quality hash measures 71GB/s on M4 -
…The readme and https://scholar.google.com/scholar?hl=es&as_sdt=0%2C5&q=rapi... are no help here. https://github.com/rurban/smhasher?tab=readme-ov-file#summar... explains some of the questions at greater length but of course not rapidhash's…
comment by kragen · 2025-05-17 · in New high-quality hash measures 71GB/s on M4 -
https://github.com/rurban/smhasher#:~:text=fibonacci
comment by bmn__ · 2025-04-16 · in Fibonacci Hashing: The Optimization That the World Forgot -
…function is fud, because every hash function will produce collisions in hash tables. Even SHA-256 https://github.com/rurban/smhasher/?tab=readme-ov-file#secur...
comment by rurban · 2025-03-01 · in Hash Denial-of-Service Attack in Multiple QUIC Implementations -
…) which is faster than std::collections::HashMap. With ~100 static entries, o1hash ( https://github.com/rurban/smhasher/blob/master/o1hash.h ) should also work.
comment by 5kg · 2024-09-10 · in A good day to trie-hard: saving compute 1% at a time -
…nothing about this algorithm, but I went and checked that already; it does have a PR for smhasher: https://github.com/rurban/smhasher/pull/279 The note in there that the output of the algorithm is different for different SIMD widths seems…
comment by llimllib · 2024-05-13 · in GxHash is a fast and robust non-cryptographic hashing algorithm -
smhasher is more up to date: https://github.com/rurban/smhasher?tab=readme-ov-file#smhash...
comment by pornel · 2024-03-01 · in Hash functions: An empirical comparison (2008) -
Confirmed, I tested it. https://github.com/rurban/smhasher
comment by rurban · 2023-08-18 · in The PolymurHash universal hash function -
…and this one discohash - a "more traditional" ARX-based design (addition rotation xor)^3 ). 0: https://github.com/rurban/smhasher/blob/master/xxh3.h 1: https://pvk.ca/Blog/2022/12/29/fixing-hashing-modulo-alpha-e... 2:…
comment by keepamovin · 2023-06-24 · in Show HN: Discohash – a fast and quality hash in 120 lines -
…are missing. some do offer symbolic verification of the algo, but not the implementations. See my https://github.com/rurban/smhasher#crypto paragraph, and "Finding Bugs in Cryptographic Hash Function Implementations", Nicky Mouha, Mohammad…
comment by rurban · 2023-03-07 · in A Vulnerability in Implementations of SHA-3, Shake, EdDSA -
…story reminds me a lot on the false recommendation of siphash for hash table DDOS prevention. https://github.com/rurban/smhasher#security The authors came up in their widely cited paper with a proper solution to spread the random hash seed…
comment by rurban · 2023-03-06 · in Academic urban legends (2014) -
Short answer: FNV-1a. https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo... https://github.com/rurban/smhasher#summary
comment by ZoomZoomZoom · 2022-12-04 · in Adventures in Advent of Code -
This is the best, most comprehensive hash test suite I know of: https://github.com/rurban/smhasher/ you might want to particularly look into murmur, spooky, and metrohash. I'm not exactly sure of what the tradeoffs involved are, or what…
comment by llimllib · 2022-10-13 · in New ScyllaDB Go Driver: Faster Than GoCQL and Its Rust Counterpart -
Ad exploitations: I've added some inverses of hash functions here: https://github.com/rurban/smhasher/tree/master/inverse
comment by rurban · 2022-09-21 · in Hash collisions and exploitations – Instant MD5 collision -
…hash that is easy to port to the restricted subset of C supported by eBPF with minimal changes. https://github.com/rurban/smhasher is a great resource for that. I would probably choose different, more robust hash functions if I was…
comment by lmb · 2022-09-11 · in Count-Min Sketch (2019) -
…really FNV-1a anymore. [0]: https://github.com/tkaitchuck/aHash/blob/master/src/aes_hash... [1]: https://github.com/rurban/smhasher/blob/master/doc/FNV1a_YT.... [2]: https://github.com/rurban/smhasher/blob/master/doc/ahash64.t... [3]:…
comment by anonymoushn · 2022-08-09 · in A quick and practical “MSI” hash table -
…inserts) using SIMD, and the latency becomes negligible. [1] https://github.com/Genbox/FastHash [2] https://github.com/rurban/smhasher
comment by Genbox · 2022-08-09 · in A quick and practical “MSI” hash table -
Have you seen https://github.com/rurban/smhasher ? So the fastest hash functions on x86_64 without quality problems are: xxh3low, wyhash, ahash64, t1ha2_atonce, komihash...
comment by wmf · 2022-07-16 · in Ask HN: Best non-cryptograpic hashing algorithm for audio data? -
…once, but today FNV is not even close to being a fast hash function. Check the SMHasher benchmarks: https://github.com/rurban/smhasher#smhasher FNV1a almost 2x slower than blake3, a cryptographic hash function! More than 10x slower than…
comment by ot · 2022-05-10 · in A Simple Hash for Perlin Noise -
I'm collecting such inverters at https://github.com/rurban/smhasher/tree/inverse/inverse But only 3 so far.
comment by rurban · 2022-01-14 · in Reversing an integer hash function -
SMHasher results are here: https://github.com/rurban/smhasher/ below the FNV's. In short: it shows why a simple word mixer alone is not enough for a proper hash. It is insecure, fails all tests, and is not as fast as expected. I would not…
comment by rurban · 2021-11-18 · in A hash function using only add, sub, ror, and xor -
Link to the SMHasher results: https://github.com/rurban/smhasher/blob/master/doc/floppsyha... And a little live DEMO using the JavaScript port: https://88e9g.csb.app/
comment by graderjs · 2021-10-30 · in Show HN: Floppsyhash – Floating-point hash that's v slow and v good quality -
…with seeds in [0, 4096); I'm not convinced the sha3 wrapper does anything useful with the seed here https://github.com/rurban/smhasher/blob/37cffd7b9cdaa2140c53... . I expect something similar is happening with SHA1 and SHA2. The MD5 row…
comment by pkhuong · 2021-10-30 · in Meow Hash (2018) -
How does it compare to XXH3? https://github.com/Cyan4973/xxHash https://github.com/rurban/smhasher#readme says XXH3 is 16GB/s while meow is 17GB/s.
comment by wolf550e · 2021-10-29 · in Meow Hash (2018) -
For comparison: https://github.com/rurban/smhasher/ It's indeed pretty fast ( among the top 5), but not particularly good. It fails some basic tests. Rather use xxh3, t1ha or farmhash
comment by rurban · 2021-10-29 · in Meow Hash (2018) -
SMHasher benchmark numbers are here (including Meow Hash): https://github.com/rurban/smhasher#readme
comment by apavlo · 2021-10-29 · in Meow Hash (2018) -
I like to check smhasher for comparison of many hash implementations: https://github.com/rurban/smhasher . It’s a bit clunky to search for the exact items you want to compare, but there’s lots of data and a good summary under the table.
comment by memco · 2021-07-26 · in BLAKE3 1.0 -
…inverses to reverse hash functions. Simply by inverting every expression from bottom to top. https://github.com/rurban/smhasher/tree/inverse/inverse Multiplication was the hardest, and several numbers were hardly invertible. OpenSSL has a…
comment by rurban · 2021-04-13 · in Mathematician Disproves 80-Year-Old Algebra Conjecture -
…realize that you have a more active fork. > not just 47x faster, but 5000x faster It's 47x faster: https://github.com/rurban/smhasher/issues/189
comment by nigeltao · 2021-04-08 · in Wuffs’ PNG image decoder -
…47x faster, but 5000x faster. Other than wuff's implementation of the crc32_pclmul variant. Compare https://github.com/rurban/smhasher/#smhasher crc32 392.10 vs crc32_pclmul 1972140.38 MiB/sec Reminds me a lot on ATS
comment by rurban · 2021-04-06 · in Wuffs’ PNG image decoder -
Added it to smhasher https://github.com/rurban/smhasher/#smhasher It may be the fastest rust hash, but certainly not faster than other fast hashes. More like 2x slower. xxh3, t1ha0, wyhash are all much faster on the 2 machines I tested it…
comment by rurban · 2021-03-15 · in New Bare Hash Map: 2X-3X Speedup over SOTA -
xxHash is legacy, replaced by xx3. Still not the fastest block hash, https://github.com/rurban/smhasher This is a good survey paper about the old, known, fast, simple one-line hashes. I've tested all of them in smhasher also. They are all…
comment by rurban · 2021-02-14 · in High Speed Hashing for Integers and Strings (2015) -
Everything is wrong with MD5. Insecure, extremely slow, bad statistical properties. https://github.com/rurban/smhasher
comment by rurban · 2020-08-23 · in Python Hash Tables: understanding dictionaries -
You can see its properties here https://github.com/rurban/smhasher Passes all smhasher tests for a tiny size (157 byte on x64), but slow as every more secure hash. I would put it as alternative to people using siphash. Personally I see no…
comment by rurban · 2020-08-18 · in New Level 7 Hash Function: Prvhash -
…SMhasher benchmark suite tests a much more exhaustive list of hash functions (including wyhash) - https://github.com/rurban/smhasher https://www.strchr.com/hash_functions Is also a great write up of how some of the classic hashing…
comment by feniv · 2020-07-28 · in XXH3, world's fastest hash algorithm, has reached stable status -
…including security claims, preliminary cryptanalysis, and a discussion on hash flooding [2]. [1] https://github.com/rurban/smhasher#security [2] https://eprint.iacr.org/2012/351.pdf
comment by niftich · 2020-05-23 · in Show HN: Discohash – Fast Hash -
…[1] https://cloud.google.com/compute/docs/machine-types [2] https://www.cs.virginia.edu/stream/ [3] https://github.com/rurban/smhasher
comment by CalChris · 2020-05-23 · in Show HN: Discohash – Fast Hash -
…of switching (or any nontrivial change) may outweigh the benefits of leaving everything as-is. [1] https://github.com/rurban/smhasher#summary
comment by niftich · 2020-05-23 · in Show HN: Discohash – Fast Hash -
…to understand what "really bad" and "fails most of the tests" means. For the record, the commit: https://github.com/rurban/smhasher/commit/10f56385f3e9abb018... The main point of this hash, in this context, is to do streaming hash and find…
comment by majke · 2020-03-03 · in When Bloom filters don't bloom -
…are dozens of better options. I recently included most secure hashes with tons of variants into https://github.com/rurban/smhasher/blob/master/README.md#smh... SHA3 would be atrocious. Something like fletcher2 or wyhash seem to be best.
comment by rurban · 2019-12-16 · in Pointer Authentication -
…fast hash function. Oh my! SipHash is by far the slowest of all practical hash functions. https://github.com/rurban/smhasher#smhasher
comment by rurban · 2019-10-11 · in Hash tables -
…Too slow for real world usage, and not secure enough for real world security attacks. Compare https://github.com/rurban/smhasher and my complaints https://github.com/google/highwayhash/issues/28
comment by rurban · 2019-03-23 · in HighwayHash: Fast hashing at over 10 GB/s per core in Golang -
…need to see it in context. Wang Yi only compared to t1ha, only in one criteria. This is the code: https://github.com/rurban/smhasher/blob/master/wyhash.h
comment by rurban · 2019-03-12 · in New fastest portable hash: wyhash -
…table, because the faster hash (every operation) outweighs the extra full string checks (rare). https://github.com/rurban/smhasher
comment by martincmartin · 2018-10-20 · in Meow Hash: A high-speed non-cryptographic hash function -
…is included (git close && make). The quality and speed could be checked by Reini Urban's ( https://github.com/rurban/smhasher ) and Yves Orton's ( https://github.com/demerphq/smhasher ) forks of SMHasher suite. Reasonable to note: t1ha…
comment by erthink · 2018-08-14 · in T1ha: even more Faster and Better hash functions family -
The best is currently Leonid Yuriev's t1ha. See https://github.com/rurban/smhasher/ Note that in contrast with what Andy or DJB say, the collision safety is not a problem of the hash function per se, as you cannot fix collision attacks…
comment by rurban · 2018-06-17 · in Fibonacci Hashing: The Optimization That the World Forgot -
Submitted a PR for your SMHasher repo: https://github.com/rurban/smhasher/pull/41 .
comment by valera_rozuvan · 2018-04-24 · in An Introduction to Hashing in the Era of Machine Learning -
…and small, XXhash is too big and trashes the icache. The current leaders are on my smhasher site, https://github.com/rurban/smhasher/
comment by rurban · 2018-01-10 · in Show HN: Go version of HighwayHash with optimized assembly implementations