2 releases

0.1.1 Oct 11, 2021
0.1.0 Oct 11, 2021

#1641 in Algorithms

Download history 175/week @ 2023-06-01 50/week @ 2023-06-08 155/week @ 2023-06-15 205/week @ 2023-06-22 122/week @ 2023-06-29 126/week @ 2023-07-06 120/week @ 2023-07-13 157/week @ 2023-07-20 133/week @ 2023-07-27 93/week @ 2023-08-03 119/week @ 2023-08-10 130/week @ 2023-08-17 97/week @ 2023-08-24 67/week @ 2023-08-31 113/week @ 2023-09-07 78/week @ 2023-09-14

363 downloads per month
Used in 7 crates (6 directly)

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.


lib.rs:

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