lua-users home
lua-l archive

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

> PS: I didn't grok the double hashing in the old version.  Looks pretty
> strange.  Or should the  "h1 += (h&(tsize-2)) + 1" just add some
> random value (0<val<tsize)?

Exactly; well, it is not really random ;-) (and it is fast to compute)

> Does this function guaranties that it probes _all_ slots?

Yes, because the size of a table were always a prime number.

-- Roberto