[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua constants?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 4 Aug 2003 14:23:52 -0300
>I know I can do the above, but I don't want the extra bit of variable look
>up and math on each call... I want "base + x" to be resolved at compile time
>into a number constant.
Aren't you prematurely optimizing?
>And then have lua compile that, is the compile process smart enough to
>collapse the contant math into a single contant: such as
No. The code generator does not currently do constant folding.