[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.3.0 (work1) now available
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 9 Jul 2013 11:52:37 -0300
> In other words, I'm worried that people who don't need this "automatic
> int management" could possibly suffer from a performance hit, _forcing_
> them to be more careful when writing code.
If your script deals mostly with real numbers, then the occasional x=0
or x=y+1 probably won't affect your performance much because most other
operations will be in floating point.
If your script deals exclusively with integers, then you'll probably see
some better performance, though how much remains to be seen. There may be
some performance hit, mostly coming from using math.floor to simulate
integer division. Roberto reported recently on a sort program that used
math.floor((a+b)/2) to split an array at the middle:
However, I think that Roberto tested that program on a machine for which
the conversion int <-> float is costly. I'm not sure modern machines have
Bottom line, the work version is meant to be tested and feedback sent. Thanks.