lua-users home
lua-l archive

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


>  Will the compiler optimize things like this:
>
>io.write(20/4)
>
>  So the division is not carried out every time that statement is
>executed?

No, the code generator does not do constant folding nor common expression
eliminations. It works hard on other optimizations instead.
--lhf