lua-users home
lua-l archive

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


> I'm not sure you'd be able to see much of a difference, except for
> big arrays. The dispatch/decode overhead in the Lua interpreter
> might shadow the effects.

There is no much difference, indeed...


> But AFAIR it's not that much code that needs to be changed. Split
> the internal and external tag representation and adjust the macros
> that deal with tagged values. You'll need to add explicit tests
> for numbers in a couple places, instead of a switch () on the tag.

I wrote an lobject.h with these changes some time ago. I will update
it and post to the list.


> And, most importantly, canonicalize all NaNs at the ingress points
> to the VM! For Lua that's only lua_pushnumber, string-to-number
> conversions and maybe the bytecode loader.

I unserstand the problem with lua_pushnumber (which copies whatever
number you give to it), but why can string-to-number conversions
generate non canonical NaNs?

-- Roberto