lua-users home
lua-l archive

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


On Tue, 2011-04-19 at 16:31 +0200, Mike Pall wrote:
> Work starts next week. Results will be even more impressive. ;-)

I really like your "marketing" :) Can't wait for for it...

I have one (maybe dumb) question - usually, when floating point
performance of a CPU is bad, you can make use of fixed point arithmetics
using integers (using a limited precision, of course).

I imagine you can emulate this in standard Lua by using custom objects
(userdata?) with __add, __sub, __mul, etc, and bit.* functions operating
on integers (and avoid using floating point numbers).

Could the JIT use such optimizations automatically, or maybe at least
remove the intermediate __add and bit.* calls operating on the integers
directly?