From: Stephen Hemminger <redacted>
Date: Fri, 8 Jul 2011 16:41:28 -0700
What about using murmur hash which has a four byte pass as well.
https://sites.google.com/site/murmurhash/
I'm trying to avoid multiplies that are not done in hardware on some
cpus.
Right now I'm looking at one of Thomas Wang's hashes, referenced on
Bob Jenkin's hash analysis page:
u32 hashint(u32 a)
{
a += ~(a<<15);
a ^= (a>>10);
a += (a<<3);
a ^= (a>>6);
a += ~(a<<11);
a ^= (a>>16);
return a;
}
It's 15 instructions, and produces better entropy in the low bits of
the result than the high bits, which is fine for how we'll use this
thing.