|
On 4/19/2011 11:58 PM, Adam Strzelecki wrote:
Could the JIT use such optimizations automatically, or maybe at least remove the intermediate __add and bit.* calls operating on the integers directly?It already there, quoting Mike's earlier response: "The ARM port uses the dual-number mode of LuaJIT. All Lua numbers are represented either as integers or doubles internally. This is transparent to the user of the VM. Except for the performance effects, of course: e.g. 'for i=1,1e7 do end' runs much faster than 'for i=1.5,1e7 do end'."
IIRC, Michal was talking about inferring and accelerating fixed point arithmetic, which is a legit question that goes further than what you have quoted in the above.
-- Cheers, Kein-Hong Man (esq.) Kuala Lumpur, Malaysia