lua-users home
lua-l archive

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


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.
> 
> Curt

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 
after all? 

-- 
"No one knows true heroes, for they speak not of their greatness." -- 
Daniel Remar.
Björn De Meyer 
bjorn.demeyer@pandora.be