3 ms·
Isn't this going to be intrinsically restricted to one numeric type? Lua numbers are all the same type (double by default).
by JulianMorrison 13y ago
Isn't this going to be intrinsically restricted to one numeric type? Lua numbers are all the same type (double by default).
- justincormack 13y agoNo, LuaJIT has an ffi interface with support for any type, and you can just use them as if they are native types.
- derleth 13y agoSeems a bit like cheating if you do it that way, though.
- deleted 13y ago[deleted]
- justincormack 13y agoIts not really, they are just native types, but defined with a C syntax so they are compatible with C. The code generation knows about them natively and optimises them.
- derleth 13y agoEh, programs compiled to assembly language aren't limited to machine-word-sized integers and whatever the floating-point hardware (if any) natively supports. I'd be interested to know what its performance on integer code is, though.