> But about objects, I must confess I was really suspicious of your
> handling hash collisions at first, though after doing the math I know
> it's pretty safe (2^31 is a big key space, after all). However, that
> depends on how good the hash function is. And the current one seems a
> bit simplistic (I was able to easily provoke a collision, which was
> fun, nonetheless :) I can offer a 4-line patch based on the FNV hash
> (<http://www.isthe.com/chongo/tech/comp/fnv/>) blindly adapted for
> 31-bits here.
> 
> Sorry to nag you with such trivialities, but I am still feeling my
> ground with Neko...

The current hash function offer some additional warantee. It should
never collide for identifiers of 4 chars or less. Compared to FNV it
uses + instead of ^, and a lower prime number (223). It's a hash
function already used successfuly in the OCaml language.

Nicolas

-- 
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to