lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I stumbled across this link:

which claims to include a good hash algorithm. I know the hashing in lua is supposed to be excellent, but I thought I'd point it out anyway and let the lua authors evaluate the well presented claims on the page.

I quote:

I offer you a new hash function for hash table lookup that is faster and more
thorough than the one you are using now. I also give you a way to verify that it is
more thorough.


A common weakness in hash function is for a small set of input bits to cancel each
other out. There is an efficient test to detect most such weaknesses, and many
functions pass this test. I gave code for the fastest such function I could find.
Hash functions without this weakness work equally well on all classes of keys.