lua-users home
lua-l archive

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


Lua 5.2 beta implements the "NaN trick": it packs all Lua values into a
single double value by representing non-numeric values as signaled NaNs,
which are (usually) not produced by the system.

This trick should work on most 32-bit machines that follow IEEE
754-2008 for double representation. However, currently it is being
enabled only by predefined macro __i386__ (and similars). We would
like to know what other platforms could benefit from this trick
(and what macros should we check in luaconf.h). You can force the
trick by compiling Lua with -DLUA_NANTRICKLE (for little endian
systems) or -DLUA_NANTRICKBE (for big endian).

(Of course, we would also like to know whether there are problems
with this implementation.)

-- Roberto