Fastest Hash Function For Table Lookups in C! - CodeProject
Fastest Hash Function For Table Lookups in C! - CodeProject
7M Sign in
Introduction
Update 2019-Oct-30
KAZE_www.byronknoll.com_cmix-
v18.zip_english.dic:
44880 lines read
131072 elements in the table (17 bits)
Pippip_Yurii: 2325 [ 6822] !
Speed Brutality !
Pippip: 3046 [ 6822]
Totenschiff: 3308 [ 6818]
Yorikke: 2672 [ 6883]
wyhash: 5072 [ 6812]
FNV-1a: 4310 [ 6833]
CRC-32: 5251 [ 6891]
iSCSI CRC: 3631 [ 6785]
"KAZE_IPS_(3_million_IPs_dot_format).TXT":
2995394 lines read
8388608 elements in the table (23 bits)
Pippip_Yurii: 407608 [476410]
Pippip: 443241 [476410]
Totenschiff: 511103 [476467]
Yorikke: 530381 [506954]
wyhash: 551765 [476412]
FNV-1a: 716070 [477067]
CRC-32: 605808 [472854]
iSCSI CRC: 391876 [479542]
! Still 1st !
"KAZE_Word-list_12,561,874_wikipedia-en-
html.tar.wrd":
12561874 lines read
33554432 elements in the table (25 bits)
Pippip_Yurii: 2018116 [2084750]
! Speed Brutality !
Pippip: 2148478 [2084750]
Totenschiff: 2313835 [2084381]
Yorikke: 2383182 [2099673]
wyhash: 2787755 [2081865]
FNV-1a: 3123546 [2081195]
CRC-32: 2998909 [2075088]
iSCSI CRC: 2154190 [2077725]
KAZE_www.gutenberg.org_ebooks_100.txt:
138578 lines read
524288 elements in the table (19 bits)
Pippip_Yurii: 17178 [31196] !
Speed Brutality !
Pippip: 18174 [31196]
Totenschiff: 20336 [31134]
Yorikke: 23733 [31139]
wyhash: 28118 [31260]
FNV-1a: 49246 [31178]
CRC-32: 41789 [31210]
iSCSI CRC: 22606 [31248]
KAZE_www.maximumcompression.com_english.di
c:
354951 lines read
1048576 elements in the table (20 bits)
Pippip_Yurii: 41439 [53393] !
Speed Brutality !
Pippip: 44554 [53393]
Totenschiff: 48462 [53546]
Yorikke: 49988 [53782]
wyhash: 61612 [53996]
FNV-1a: 68586 [53896]
CRC-32: 65252 [54020]
iSCSI CRC: 46324 [53915]
KAZE_enwiki-20190920-pages-
articles.xml.SORTED.wrd:
42206534 lines read
134217728 elements in the table (27 bits)
Pippip_Yurii: 8253384 [5996107]
! Speed Brutality !
Pippip: 8734972 [5996107]
Totenschiff: 9215109 [5996598]
Yorikke: 9271283 [6011605]
wyhash: 11241704 [5991525]
FNV-1a: 12017273 [5980248]
CRC-32: 11570725 [5843653]
iSCSI CRC: 8433784 [5803092]
Update 2019-Oct-27
E:\Lookuperorama.c_r6\xxHash-
0.7.2_Kaze\tests\bench>main --list
available hashes :
FNV1A_Pippip, xxh3, XXH32, XXH64, XXH128
E:\Lookuperorama.c_r6\xxHash-
0.7.2_Kaze\tests\bench>main --maxs=384 --
minl=7
=== benchmarking 5 hash functions ===
Update 2019-Oct-26
KAZE_www.byronknoll.com_cmix-
v18.zip_english.dic:
44880 lines read
131072 elements in the table (17 bits)
"KAZE_Word-list_12,561,874_wikipedia-en-
html.tar.wrd":
12561874 lines read
33554432 elements in the table (25 bits)
KAZE_www.gutenberg.org_ebooks_100.txt:
138578 lines read
524288 elements in the table (19 bits)
KAZE_www.maximumcompression.com_english.di
c:
354951 lines read
1048576 elements in the table (20 bits)
Pippip: 44669 [53393] !
Fastest on all major English words,
a tear is falling !
Totenschiff: 48633 [53546]
Yorikke: 49951 [53782]
wyhash: 61668 [53996]
YoshimitsuTRIAD: 54825 [53658]
FNV-1a: 68106 [53896]
Larson: 67358 [54076]
CRC-32: 64756 [54020]
Murmur2: 62863 [53857]
Murmur3: 62782 [53983]
XXHfast32: 68146 [53411]
XXHstrong32: 70334 [53391]
iSCSI CRC: 46122 [53915]
_MakeEXE_Lookuperorama_GCC.bat
_MakeEXE_Lookuperorama_ICL.bat
Hasher | Collisions |
Synthetic/Taxed Hashing Speed for ALL keys
|
------------------------------------------
----------------------------------------
SSE4.2 iSCSI CRC32 | 23,737,621 |
208,334,772 KEYS-PER-SECOND / 5,565,507
Keys/s |
SHA3-224 | 23,737,389 |
104,465 KEYS-PER-SECOND / 102,052 Keys/s
|
------------------------------------------
----------------------------------------
Hasher | Collisions |
Synthetic/Taxed Hashing Speed for ALL keys
|
------------------------------------------
----------------------------------------
FNV1A-Pippip | 23,738,813 |
269,144,006 KEYS-PER-SECOND / 5,026,910
Keys/s |
WYHASH | 23,738,215 |
134,688,314 KEYS-PER-SECOND / 5,026,910
Keys/s |
XXH64 | 23,737,218 |
115,861,992 KEYS-PER-SECOND / 4,869,819
Keys/s |
XXH3 | 23,735,377 |
174,702,219 KEYS-PER-SECOND / 5,026,910
Keys/s |
------------------------------------------
----------------------------------------
F:\Lookuperorama.c_r6>Lookuperorama_GCC-