HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
rurban
smhasher
C++2015–2026
rurban / smhasher

smhasher

Hash function quality and speed tests

35Distinct people
67Mentions
1Explicit recommenders
2.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Hash function quality and speed tests

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

Disochash is a simple prime-multiplication ARX (addition rotation XOR) hash that's high-quality and fast. It's only 120 lines of code. There's lots of great hash functions out…

keepamovin used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 6:36:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year67 dated mentions

Observed mentions: 2015-05-28 13:42:43 UTC to 2026-01-21 11:45:24 UTC.

0510152015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 6 mentions; 2 submissions, 4 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 7 mentions; 0 submissions, 7 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 14 mentions; 1 submissions, 13 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC505
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC505
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC404
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC505
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC624
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC707
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC14113
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC909
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC404
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC303
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC404
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
SMhasher Hash function MiB/sec cycl./hash cycl./map size Quality problems donothing32 11536809.55 4.00 - 13 bad seed 0, test NOP donothing64 12269832.97 4.00 - 13 bad seed 0, test NOP donothing128 11961841.48 4.08 - 13 bad seed 0, test NOP NOP_OAAT_read64 11652662.97 14.00 - 47 test NOP BadHash 794.68 72.80 - 48 bad seed 0, test FAIL sumhash 10184.67 29.40 - 417 bad seed 0, test FAIL sumhash32 44755.87 23.46 - 697 UB, test FAIL multiply_shift 8286.63 25.39 209.06 (2) 345 bad seeds & 0xfffffff0, fails most tests pair_multiply_shift 5728.05 39.67 218.48 (12) 609 fails most tests -------------------------- crc32 369.88 142.33 396.81 (101) 363 insecure, 8590x collisions, distrib, PerlinNoise md5_32 359.43 638.92 865.21 (6) 598 md5_64 360.20 640.38 869.55 (6) 662 md5-128 344.63 669.59 856.34 (5) 557 sha1_32 353.03 1385.80 1759.94 (5) 5126 Sanity, Cyclic low32, 36.6% distrib sha1_64 353.03 1385.80 1759.94 (5) 5126 Sanity, Cyclic low32, 36.6% distrib sha1-160 364.95 1470.55 1794.16 (13) 5126 Comb/Cyclic low32 sha2-224 147.13 1354.81 1589.92 (12) 695 Comb low32 sha2-224_64 147.60 1360.10 1620.93 (13) 600 Cyclic low32 sha2-256 147.80 1374.90 1606.06 (16) 663 sha2-256_64 148.01 1376.34 1624.71 (16) 600 sha1ni 1632.88 170.77 379.84 (5) 1321 insecure,sanity, Permutation, Zeroes, machine-specific sha1ni_32 1583.50 172.17 387.70 (4) 1273 machine-specific sha2ni-256 1556.66 180.75 393.79 (5) 1495 insecure,sanity, Permutation, Zeroes, machine-specific sha2ni-256_64 1508.82 184.89 393.07 (6) 1409 Zeroes, machine-specific blake3_c 1298.04 354.25 563.63 (4) 16462 no 32bit portability rmd128 294.42 712.67 930.65 (4) 950 rmd160 202.16 1045.79 1287.74 (16) 950 Cyclic hi32 rmd256 366.21 615.39 830.04 (7) 1026 edonr224 863.77 304.76 496.66 (3) 834 edonr256 870.97 296.40 517.82 (6) 834 blake2s-128 295.30 698.09 1059.24 (51) 329 blake2s-160 215.01 1026.74 1239.54 (11) 329 blake2s-224 207.06 1063.86 1236.50 (20) 329 blake2s-256 215.28 1014.88 1230.38 (28) 329 blake2s-256_64 211.52 1044.22 1228.43 (8) 323 blake2b-160 356.08 1236.84 1458.15 (12) 505 blake2b-224 356.59 1228.50 1425.87 (16) 505 blake2b-256 355.97 1232.22 1443.31 (19) 505 blake2b-256_64 356.97 1222.76 1435.03 (9) 501 asconhashv12 144.98 885.02 1324.23 (38) 4341 asconhashv12_64 159.33 402.54 473.15 (4) 6490 sha3-256 100.58 3877.18 4159.79 (37) 1686 PerlinNoise sha3-256_64 100.57 3909.00 4174.63 (16) 1630 PerlinNoise hasshe2 2879.93 62.47 272.34 (2) 505 Permutation,TwoBytes,Zeroes,Seed poly_1_mersenne 1278.37 63.42 244.41 (1) 479 fails most tests poly_2_mersenne 1391.90 69.97 255.44 (3) 479 poly_3_mersenne 1320.15 80.81 263.12 (2) 479 poly_4_mersenne 1393.93 89.07 262.97 (2) 479 tabulation32 5819.40 40.16 233.00 (3) 848 collisions tabulation 7407.94 39.83 240.25 (4) 554 crc32_hw 5537.79 40.80 225.65 (3) 653 insecure, 100% bias, collisions, distrib, BIC, machine-specific (SSE4.2/NEON) crc32_hw1 7626.17 50.21 228.50 (2) 696 insecure, 100% bias, collisions, distrib, BIC, machine-specific (x86 SSE4.2) crc64_hw 5579.17 40.87 202.19 (1) 652 insecure, 100% bias, collisions, distrib, BIC, machine-specific (SSE4.2/NEON) crc32_pclmul 7963.20 106.02 567.70 (3) 254 insecure, 100% bias, collisions, distrib, BIC, machine-specific (x86 SSE4.2+PCLMUL) crc64_jones1 1673.67 83.00 249.16 (2) insecure, 100% bias, collisions, distrib, BIC, machine-specific crc64_jones2 2968.07 314.60 253.01 (3) insecure, 100% bias, collisions, distrib, BIC, machine-specific crc64_jones3 3398.80 302.59 258.16 (8) insecure, 100% bias, collisions, distrib, BIC, machine-specific crc64_jones 3512.66 80.70 251.40 (2) insecure, 100% bias, collisions, distrib, BIC, machine-specific o1hash 11530366.92 18.40 206.94 (1) 101 insecure, no seed, zeros, fails all tests fibonacci 15409.62 22.67 872.83 (3) 1692 UB, zeros, fails all tests FNV1a 754.70 75.28 226.30 (2) 54 bad seed, zeros, fails all tests FNV1A_Totenschiff 6166.85 26.60 235.71 (2) 270 UB, zeros, fails all tests FNV1A_Pippip_Yurii 24196.44 86.25 539.41 (3) 603 bad seeds, UB, sanity, x64 AESNI only FNV1a_YT 13481.70 30.67 233.71 (7) 336 bad seed, UB, fails all tests FNV2 5630.87 32.09 207.08 (1) 278 fails all tests FNV64 747.70 74.18 189.18 (1) 70 fails all tests FNV128 408.59 130.82 299.47 (20) 153 fails all tests k-hash32 2227.90 53.85 255.78 (2) 808 insecure, zeros, UB, bad seeds, fails all tests k-hash64 2492.66 48.18 242.58 (2) 609 insecure, zeros, UB, bad seeds, fails all tests fletcher2 15410.12 20.72 345.55 (5) 117 bad seed 0, UB, fails all tests fletcher4 15603.68 21.24 320.09 (2) 117 bad seed 0, UB, fails all tests bernstein 1032.00 59.04 225.09 (3) 56 bad seed 0, fails all tests sdbm 772.01 71.67 220.09 (2) 54 bad seed 0, fails all tests x17 765.01 75.61 225.81 (2) 65 99.98% bias, fails all tests libiberty 618.39 86.58 220.95 (2) 37 insecure, 100% bias, fails all tests, bad seed gcc 612.10 88.44 224.62 (2) 55 insecure, 100% bias, fails all tests, bad seed JenkinsOOAT 615.60 111.23 251.08 (2) 150 bad seed 0, 53.5% bias, fails all tests JenkinsOOAT_perl 631.79 93.13 232.44 (1) 65 bad seed 0, 1.5-11.5% bias, 7.2x collisions, BIC, LongNeighbors MicroOAAT 730.89 78.25 236.07 (3) 78 100% bias, distrib, BIC pearsonhash64 439.85 123.07 213.68 (1) Avalanche, Seed, SSSE3 only. broken MSVC pearsonhash128 438.49 123.81 212.89 (2) Avalanche, Seed, SSSE3 only. broken MSVC pearsonhash256 440.63 120.72 224.63 (2) Avalanche, Seed, SSSE3 only. broken MSVC VHASH_32 13084.37 65.45 280.14 (2) 1231 sanity, Seed, MomentChi2 VHASH_64 13217.64 64.90 270.04 (2) 1231 sanity, Seed, Sparse farsh32 27583.89 65.65 266.64 (2) 944 insecure: AppendedZeroes, collisions+bias, MomentChi2, LongNeighbors farsh64 13558.69 113.74 327.26 (3) 944 insecure: AppendedZeroes, collisions+bias, MomentChi2, LongNeighbors farsh128 7055.39 229.42 375.57 (4) 944 insecure:
Read the full README on GitHub

What Hacker News says

5 sources
Cyan4973/Yann also is well known for xxhash[1], which is one of the faster hashers[2] out there. Post a new hasher and people will probably ask about xxhash (ex: metrohash[3]). Guy is an absolute machine. If you search Google for 'zstd' right now, you'll find him, not Facebook, namely: https://github.com/Cyan4973/zstd . Glad his work is being supported by someone now! Immensely well deserved, after so many years of helping make everyone fast. PS - I didn't know a lot of the terms you used, but the Finite State Entropy (FSE) link you provided does a good job intro'ing some of them, and the linked paper Asymmetric numeral systems: entropy coding combining speed of Huffman coding with compression rate of arithmetic coding [4] (ANS) seems interesting. [1] https://github.com/Cyan4973/xxHash [2] https://github.com/rurban/smhasher [3] https://ne
Read the rest
In Smaller and faster data compression with Zstandard
Indeed, asking the question of "Why are we doing this" and "What problem does this solve" is a great way to start a discussion of any engineering solution, and a great way to avoid doing unnecessary work. There are a lot of things that fundamentally deal with either systems that users interact with or that run on real machines with physical world implications that also make things perform differently, from user interaction latency and pre-computing and pre-caching, to SSD block level reads/writes, cpu caches and other caches, network latency implications, etc. Similarly, on the algorithm front from things like Boyer–Moore to work being done on non-cryptographic hashes (ie, https://github.com/rurban/smhasher/ ) that is sometimes mind boggling.
In 10 Optimizations on Linear Search
Oh my, again the folks who think that a better hash function saves you from DDOS attacks on collision resolution with linked lists. This is pure nonsense! Get over it please. Hashes for hash tables need to be small and fast, that's all. First, from any hash only a few bits are use for a hash table lookup, typically between 5-8. It depends on the size of the table. You can make your hash function long and strong, but only the last few bits count, and this does not help you at all against DDOS. Second, against DDOS only uhash, or using no linked lists or arrays with O(n/2) lookup costs help. A random seed is good, but can be detected. E.g. a timeout as used by djb in his nameserver does help better than a stronger hash function. Or using a hash table as in glibc, gcc or the linux kernel. siphash or HighwayHash does not help at all. python
Read the rest
and perl both fell into this trap. But I appreciate the effort to create a fast metro like hash function, without resorting to the internal crc32 builtin. Will be included in smhasher soon. Summary: https://github.com/rurban/smhasher#summary
In HighwayHash: Strong hashing at 0.3 clock cycles per byte

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.