lua-users home
lua-l archive

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


> Now the keys of hash_value = 0 and hash_value = 5 will be linked
> together. Although it does not affect the use, the length of the
> conflict chain becomes longer
> 
> Does this situation meet the original intention of lua table design?

Repeating Javier:

  when you have hash slot collisions (8, 16 & 24 all want to go to the
  same slot), only one key can go to the "main" slot, the others go to
  somewhere else.... which could be the main slot for some other key.

This always is possible in closed hash tables, whatever the method
to handle collitions.

-- Roberto