rurban / smhasher

Hash function quality and speed tests
https://rurban.github.io/smhasher/
Other
1.85k stars 178 forks source link

wyhash_final3: double short key speed #185

Closed wangyi-fudan closed 3 years ago

wangyi-fudan commented 3 years ago

Dear All: I doubled short key hashing speed by announcing wyhash_final3 version.
The speed up is caused by branchless code for short keys. This speed up may not be detected by other benchmark suites. You need to benchmark it by yourself. Cheers!

hash function short hash/us
wyhash_final3 419.68
wyhash_final2 205.45
wyhash_final1 195.42
xxh3:avx2 147.33
xxh3:sse2 154.30
xxh3:scalar 153.61
xxHash64 83.10
t1ha2_atonce 115.12

benchmark code at: https://github.com/wangyi-fudan/wyhash/blob/master/benchmark.cpp benchmark dataset: /usr/share/dict/word

wangyi-fudan commented 3 years ago

@rurban please wait 1~2 days. There is still minor updates,

wangyi-fudan commented 3 years ago

hi, the version is stable now. the performance measured by smhasher should be almost the same. But when reading random positions, this version is really fast.

rurban commented 3 years ago

See also https://github.com/wangyi-fudan/wyhash/issues/99

rurban commented 3 years ago

See a22108a294af6d78bc016dbb34f4234976cc0dc2 On my old i5-2300 haswell it's slower, everywhere else significantly faster.