lua-users home
lua-l archive

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


Mike Pall wrote:
Hi,

Adam D. Moss wrote:

[...] because changing lua_Number is exactly what I did.

Maybe it is worth repeating here that this is NOT a good idea, anyway
(even if compiled properly).

At least on any general purpose CPU (x86, PPC, ...) that has been
manufactured in the past 10 years. While it is tempting to change
lua_Number to float or long, it has almost no effect on performance
and may have very bad side-effects ...

I saw a ~15% speed increase in my level-of-detail processor in going
from doubles to floats on my target platform.  I'm happy enough.

--Adam