The table below gives an overview of the implementations.
Name
Managed
Unsafe
32bit
64bit
128bit
Index
Seeded
Secret
Verified
CityHash
x
x
x
x
x
x
x
x
DJBHash
x
x
x
x
x
FarmHash
x
x
x
x
x
x
-
FarshHash
x
x
x
x
x
FNVHash
x
x
x
x
x
HighwayHash
x
x
x
x
MarvinHash
x
x
x
x
MurmurHash
x
x
x
x
x
x
-
SipHash
x
x
x
x
x
SuperFastHash
x
x
x
WyHash
x
x
x
x
x
xxHash2
x
x
x
x
x
x
x
xxHash3
x
x
x
x
x
x
x
Managed: The there is a fully managed implementation in C#.
Unsafe: There is an unmanaged implementation that uses pointers etc. These are usually faster.
Bits: 32bit means there is a 32bit optimized implementation that returns an uint. 64bit means optimized for 64bit platforms.
Index: It has an index version, which½ can hash a 32/64bit integer directly. Usually used for Hash Table mapping.
Seeded: It takes an input seed which can help prevent denial-of-service due to hash collisions.
Secret: It supports a user-provided secret. Much like seeded version it protects against DoS attacks, but with stronger security guarantees.
Verified: The original author has provided test vectors and they have been tested against the implementation. A '-' means test vectors
exist, but not yet implemented.
Performance
Hash functions
Measured on 32 MB data. The unsafe versions are implemented using C# unsafe code.
Note: Speed is not everything. The quality of a hash is just as important, but much more difficult to measure. See SMHasher for more
details on hash quality.