#hash #hsieh #super-fast-hash

sfhash

The Hsieh Hash or SuperFastHash function

2 releases

0.1.1 Oct 11, 2021
0.1.0 Oct 11, 2021

#845 in #hash

Download history 36/week @ 2026-01-06 57/week @ 2026-01-13 68/week @ 2026-01-20 71/week @ 2026-01-27 77/week @ 2026-02-03 93/week @ 2026-02-10 76/week @ 2026-02-17 81/week @ 2026-02-24 132/week @ 2026-03-03 406/week @ 2026-03-10 132/week @ 2026-03-17 203/week @ 2026-03-24 314/week @ 2026-03-31 327/week @ 2026-04-07 200/week @ 2026-04-14 55/week @ 2026-04-21

944 downloads per month
Used in 2 crates (via assembly-fdb-core)

LGPL-2.1

12KB
54 lines

sfhash

This crate contains the SuperFastHash (aka Hsieh Hash) function presented at http://www.azillionmonkeys.com/qed/hash.html

use sfhash::digest;

let hash = digest("Hello World!".as_bytes());
assert_eq!(hash, 1774740540);

The hash value is initialized with the lenght of the input, so the algorithm cannot be used incrementally.

No runtime deps