Avalanche diagrams represent how well a hash function mixes the bits of the key to produce the bits of the hash. Ideally, flipping a single bit of the key should flip every bit of the hash 50% of the time. If the probability of an input bit affecting an output bit is greater than or less than 50%, then the hash is "biased" for that input bit - output bit pair. Small amounts of bias generally have minimal effect on the quality of a hash function, large amounts of bias indicate that keys differing only in the biased bits may tend to produce more hash collisions than expected.


These avalanche diagrams were generated by a modification to Bret Mulvey's C# code, which can be found in the reference section here

I've changed the way the diagrams are generated so that input bits go from left (low bits, beginning of key) to right (high bits, end of key) and output bits go from bottom (low, beginning of hash) to top (high bits, end of hash). These diagrams are for 16-byte keys with 4-byte hashes.

The color scheme is also modified - 

0% bias is black - the output bit flips exactly 50% of the time
5% bias is green - the output bit flips between 47.5% and 52.5% of the time
33% bias is yellow - the output bit flips between 33% and 66% of the time
100% bias is red - the output bit flips either 0% or 100% of the time.

Hsieh SuperFastHash

Some clear spots of bias, but nothing major.


Jenkins lookup3

Only a few slightly biased bits.



MurmurHash 1.0

Murmur 1.0's mixing function has a bias of under 0.5%, so all the bits appear nearly black.


MurmurHash 2.0

MurmurHash 2.0's mix also has a bias of under 0.5% - everything's nearly black.



While it may be acceptable for hashing text, it doesn't mix well - you'd be better off with something else.



This is why you probably shouldn't use FNV. Both low bits of the hash and end bits of the key aren't thorougly mixed.



A lot better than I expected. One-byte-at-a-time hashes are harder to screw up, though.