[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LuaJIT 64 bit integers (was: the purpose of lightuserdata)
- From: Leo Razoumov <slonik.az@...>
- Date: Thu, 13 Jan 2011 18:27:52 -0500
On Thu, Jan 13, 2011 at 13:51, Josh Haberman <firstname.lastname@example.org> wrote:
> Roberto Ierusalimschy <roberto <at> inf.puc-rio.br> writes:
>> > Yes, I shudder to think of explaining that to users. I was initially
>> > very excited to hear your announcement of 64-bit integer support since
>> > it's been a stumbling block for adoption of Lua inside Google where we
>> > have lots of 64-bit integers floating around, [...]
>> We have discussed in the list how to compile Lua to use long doubles so
>> that regular numbers can represent 64-bit integers. Isn't that enough
>> for you?
> That's definitely one option; the most obvious downside of that is
> that long double takes up twice the memory of double or int64.
If memory consumption per long double is a concern, GCC offers
-m96bit-long-double option. On x86_64 it will incur a slight
performance penalty though, and one needs to be very careful, for this
flag changes ABI.