lua-users home
lua-l archive

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


> 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:
	http://lua-users.org/lists/lua-l/2013-07/msg00272.html
	http://lua-users.org/lists/lua-l/2013-07/msg00332.html

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
this problem.

Bottom line, the work version is meant to be tested and feedback sent. Thanks.