[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: NaN packing for TValue
- From: Miles Bader <miles@...>
- Date: Thu, 24 Feb 2011 18:31:39 +0900
Axel Kittenberger <email@example.com> writes:
> 2011/2/23 Yura Sokolov <firstname.lastname@example.org>:
>> I just made patch for NaN packing of TValue on x86 machines (as in luajit2).
> Can you say in simple words what "NaN packing of TValues" means?
TValue is the C type Lua uses to hold values.
Normally it consists of a tag field and a union of the various C types
that a Lua value can contain, but LuaJIT uses only a single double,
encoding non-number values as NaNs (a consequence of this is that no
64-bit type except for doubles can be represented exactly, so LuaJIT can
only use part of the address space on 64-bit machines, etc).
Optimist, n. A proponent of the doctrine that black is white.