[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Macros for setting / testing / getting value components in lobject.h
- From: Dibyendu Majumdar <mobile@...>
- Date: Wed, 10 Jun 2015 20:23:48 +0100
On 10 June 2015 at 15:06, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
>> So the structure looks like this:
>>
>> |------ first 8 bytes ----------| |------- second 8 bytes -------|
>> value other than double type code (int) union
>> including 64-bit int with double
>>
> What do you gain here? The standard representation is this:
>
> |------ first 8 bytes ----------| |------- second 8 bytes -------|
> any value including double type code (int)
> and 64-bit int
>
> It occupies the same space and it is simpler...
Agreed - I was investigating whether in JIT mode performance of
numeric arithmetic (important in benchmarks) would improve by
eliminating the need to set the type code for every double value. I
reported my conclusion that it did not help. Perhaps the cost of
setting/getting values from the Lua stack overwhelms any gains.