SuperFastHash has known distribution problems[1]. there is fasthash[2] function, which is comparable to murmur, but requires one multiplication per 8 bytes (and it yields 64-bit hash values) and using ulongs. i think that there is some sense in trading some speed for better distribution. what do you think?
p.s. i made a stupid tester which using "/usr/share/dict/words" to test hashing functions. it hashes each word as all-lower, all-upper and all- lower with first char as upper. the results are: fastHash64 ... perfect for 115857 words fastHash32 ... perfect for 115857 words sfHash ... 6 collisions in total that's not that bad, but fasthash is definitely better. ;-) and i believe that people that care about performance will roll their own hash functions anyway, so having not lightning fast, but good hash in druntime is better than having fast, but worse function. [1] google://superfasthash+problems [2] http://code.google.com/p/fast-hash/
signature.asc
Description: PGP signature
