lua-users home
lua-l archive

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


On 13 Jan 2015, at 01:40, Hisham <h@hisham.hm> wrote:
> 
>> On 12 January 2015 at 21:05, Tom Sutcliffe <tomsci@me.com> wrote:
>> Hi list,
>> 
>> Thought I'd share some memory usage numbers from my tests of 5.3.0 (rc4)
>> compared to 5.2.3. This is running on an ARMv7-M CPU (THUMB2 instruction set
>> with 96KB RAM) in a highly custom environment. Lua is configured with 32-bit
>> integers and no floating point (on 5.2, lua_Number is 32-bit 'long', on 5.3
>> both types of number are 32-bit 'long'),
> 
>> Module int64: 1176 (688)
>> Module int64: 1240 (708)
> 
> Random question, I might be asking something completely silly, but I
> got curious so here it goes:
> 
> I notice a module called int64, so you seem to need both 32 and 64 bit
> ints. Is it possible to configure Lua 5.3 so that "integer" is 32-bit
> ints and "number" is 64-bit int? If so, could this be a saving
> compared to using an int64 module? (I suppose your int64 module does
> only the set of 64-bit operations you really need.)

Interesting possibility. I'm sure it would be doable. I only need int64s in a very few places though, so the current design isn't all that much of a problem. At some point I should try making everything 64-bit and see if it has any tangible impact - the chip is only 32-bit but ARM's handling of double-wide math operations isn't too terrible. But having number be 64 and integer 32 might be a nice compromise. 

Tom