lua-users home
lua-l archive

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


Hi,

I do not think that LuaJIT violates Lua semantics. It is not possible
to determine live range of the given global in the presence of
functional environments, metatables, dynamic code loading.

--
e.v.e

On Sun, Jun 15, 2008 at 3:24 AM, David Given <dg@cowlark.com> wrote:
> Let's say I'm writing a program that's intended for use on LuaJIT.
>
> Is it still necessary to cache globals in local variables for decent
> performance, or can I expect the JIT to optimise this for me?
>
> For example:
>
> i = 0
> while (i < 10000) do i = i + 1 end
>
> vs.
>
> local i = 0
> while (i < 10000) do i = i + 1 end
>