lua-users home
lua-l archive

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


A bit of background: I'm not actually a Lua user, but I've been reading the
list archives for about a year, since someone pointed Lua out to me as
having similar uses to Onyx, a language which I wrote
(http://www.canonware.com/).

The thread here about hashing algorithms interested me, and I ended up
trying out Bob Jenkins's hash function with Onyx.  The results were
underwhelming; variations on a simple old algorithm[1] turn out to have
similar runtime performance, and significantly lower collision rates than
Jenkins's.  Naturally the results depend on the inputs, but Jenkin's
algorithm was a step backward for Onyx in all of my tests, and it wouldn't
surprise me if the same is true for Lua.

Jason

[1] djb2 algorithm: http://www.cs.yorku.ca/~oz/hash.html