Module fasthash::sea [] [src]

SeaHash: A bizarrely fast hash function.

by ticki ticki@users.noreply.github.com

SeaHash is a hash function with performance better than (around 3-20% improvement) xxHash and MetroHash. Furthermore, SeaHash has mathematically provable statistical guarantees.

Example

use std::hash::{Hash, Hasher};

use fasthash::{sea, SeaHasher};

fn hash<T: Hash>(t: &T) -> u64 {
    let mut s: SeaHasher = Default::default();
    t.hash(&mut s);
    s.finish()
}

assert_eq!(sea::hash64(b"hello world\xff"), 8985868041853666652);

assert_eq!(hash(&"hello world"), 1198299633807023012);

Structs

SeaHash

SeaHash 64-bit hash functions

SeaHasher64

The streaming version of the algorithm.

Functions

hash64

Hash some buffer.

hash_with_seeds

Hash some buffer according to a chosen seed.