Hacker GitHub

← All repos

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

Mentions per year 67 mentions · busiest year 2021 (14)
20082026
  1. …[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
  2. 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
  3. …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…
  4. https://github.com/rurban/smhasher#:~:text=fibonacci
  5. …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...
  6. …) which is faster than std::collections::HashMap. With ~100 static entries, o1hash ( https://github.com/rurban/smhasher/blob/master/o1hash.h ) should also work.
  7. …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…
  8. smhasher is more up to date: https://github.com/rurban/smhasher?tab=readme-ov-file#smhash...
  9. Confirmed, I tested it. https://github.com/rurban/smhasher
    comment by rurban · 2023-08-18 · in The PolymurHash universal hash function
  10. …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:…
  11. …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…
  12. …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)
  13. 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
  14. 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…
  15. Ad exploitations: I've added some inverses of hash functions here: https://github.com/rurban/smhasher/tree/master/inverse
  16. …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)
  17. …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
  18. …inserts) using SIMD, and the latency becomes negligible. [1] https://github.com/Genbox/FastHash [2] https://github.com/rurban/smhasher
  19. 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...
  20. …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
  21. 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
  22. I would not be so optimistic on RIPEMD-160 security. I found several weaknesses. https://github.com/rurban/smhasher
    comment by rurban · 2021-12-20 · in RIPEMD
  23. 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…
  24. 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/
  25. …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)
  26. 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)
  27. 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)
  28. SMHasher benchmark numbers are here (including Meow Hash): https://github.com/rurban/smhasher#readme
    comment by apavlo · 2021-10-29 · in Meow Hash (2018)
  29. 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
  30. …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…
  31. ▲ 2
    Check why SHA2 and RMD have broken bad seeds
    story by app4soft · 2021-04-08 · 1 comment
  32. …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
  33. …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
  34. 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…
  35. 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…
  36. Everything is wrong with MD5. Insecure, extremely slow, bad statistical properties. https://github.com/rurban/smhasher
  37. 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
  38. …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…
  39. …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
  40. …[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
  41. …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
  42. …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
  43. …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
  44. …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
  45. …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
  46. …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
  47. ▲ 120
    New fastest portable hash: wyhash
    story by rurban · 2019-03-11 · 49 comments
  48. ▲ 2
    Can I implement fast hashing functions like Cityhash, Farmhash, xxhash,
    story by pplonski86 · 2019-01-21 · 1 comment
  49. …table, because the faster hash (every operation) outweighs the extra full string checks (rare). https://github.com/rurban/smhasher
  50. …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…