lua-users home
lua-l archive

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


Thanks, Tony.  Somehow I missed your reply the other day.  Putting the hash value in the object itself when possible sounds like a good simplification.

Holly

On 12/16/2011 at 7:43 PM, Tony Finch <dot@dotat.at> wrote:
hollyrosella@hushmail.com <hollyrosella@hushmail.com> wrote:

> I am imagining changing ltable.c:hashpointer to a function which when
> called with a pointer p, looks p up in an internal hash table IHT. If p
> is already a key in IHT, the new hashpointer function would return the
> value there, and if not, it would...

Sounds quite plausible. Another option might be to eagerly store the PRNG
value in the object itself.

Tony.
--
f.anthony.n.finch <dot@dotat.at> http://dotat.at/
Trafalgar: Southwesterly veering northwesterly 5 or 6, occasionally 7 in
north. Rough or very rough. Rain or showers. Moderate or good.