Expand description
This crate defines various hashing functions, which
are ABI stable (as in #[repr(C)]).
Additionally all the hash functions here work in the const context.
The crate is #![no_std].
§Notes
In terms of raw performance:
FxHashis the fastest.SipHashandFNV1a_64are over twice as slow.SHA2_256_Portableis obviously the slowest, like 40x slower thanFxHash.- However platform specific implementations of
SHA2_256are actually quite fast. Especially for bigger input these are comparable withSipHash.
So if cryptographic security is not a concern, then FxHash is a valid choice,
since it also is quite ok in terms of collision resistance.
Modules§
- fnv
- Holds the implementation of several variants of Fowler–Noll–Vo hash functions and their corresponding builders.
- fxhash
- Holds the implementation of the
FxHashalgorithm. - sha2
- Holds the implementation of some
SHA-2variants. - siphash
- Holds the implementation of the
SipHashalgorithm. - traits
- Defines hash function traits.