On Wed, Jan 23, 2008 at 09:32:54AM +0100, Andreas Ericsson wrote: > > The FNV hash would be better (pasted below), but I doubt > anyone will ever care, and there will be larger differences > between architectures with this one than the lt_git hash (well, > a function's gotta have a name). Actually, Bob Jenkins' lookup3 hash is twice faster in my tests than FNV, and also it is much less likely to have any collision. The description and some comparision with other hash can be found here: http://burtleburtle.net/bob/hash/doobs.html http://burtleburtle.net/bob/c/lookup3.c Perhaps, the second choice is Paul Hsieh's hash. http://www.azillionmonkeys.com/qed/hash.html Note: Paul Hsieh provides the table where he compares his hash with others. There is also the program he used. I ran his program on my computer, advantage of his over others was not so big on my computer. Moreover, his test includes an old version of Bob Jenkins' hash. The new version -- lookup3, which I mentione above, has about the same speed as Paul Hsieh's hash (with -O2) or even 12% faster when I used -O3 -march=athlon-xp. Also, Bob Jenkins' hash is better for non-x86 architectures. So, I believe it is the best hash for today. Dmitry - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html