I remember reading that it would pose no significant speedup using native integers (isn't this the same for python aswell, btw?) - i only asked because it might create a problem some day down the road on x64, if one is trying to do integer / pointer / index arithmetic in lua (given how doubles are incapable if representing large 64-bit integers accurately)mystran wrote:Sort of.. there is no separate integer type in the language, but the native arrays treat small integers (that is integer values of the numeric type) specially, so in some sense integers are meaningful, they just share the same type (in the language) with other numbers.Mayae wrote: e: is it still true for lua that it doesn't have native integers?
IIRC LuaJIT will generate integer code (optimization is known as type narrowing) in various situations when it decides it's the right thing to do (induction variables and such should at least get narrowed). Also if I'm not mistaken, you can use the bitops to do integer arithmetic explicitly.
This is where TCC x64 starts to get fun Had some weird problems with this.. Tcc passes floats/doubles in integer registers, which is quite weirdmystran wrote:x64 calling conventions (different operating systems use slightly different variants) are different from the 32-bit cdecl convention, but yeah, you should normally get the same thing whether you specify cdecl or something else.camsr wrote:Isn't x64 calling convention limited to only cdecl?
(http://stackoverflow.com/questions/2288 ... -functions)