[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua hash algorithm
- From: Björn De Meyer <bjorn.demeyer@...>
- Date: Wed, 19 Jun 2002 19:36:42 +0200
Curt Carpenter wrote:
> > Anyway, to solve the problem with this (IMO) uncommon case,
> > I think conversion from the floating point to a string would
> > be the simplest solution. Perhaps Lua should do this internally?
> A memory allocation every time you use a number as an index? No thanks.
Hmmm... I was talking only about floating point,
but I forgot Lua internally makes no difference
between floating point variables and integers.
Or rather, it does not use integers for numbers at all... which
complicates this hashing problem. Perhaps numbers should
be split up internally between C long and and C double
"No one knows true heroes, for they speak not of their greatness." --
Björn De Meyer