[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: avoid table lookups?
- From: Javier Guerra Giraldez <javier@...>
- Date: Fri, 26 Oct 2012 09:05:01 -0500
On Fri, Oct 26, 2012 at 8:58 AM, spir <denis.spir@gmail.com> wrote:
> Is it worth in Lua, at start of a func or before a loop, to "localise" table
> fields?
only for real tight loops. and not for LuaJIT, which already does it.
also note that overuse of local 'slots' could in some cases make
closures heavier.
in short: first make it work. then (if needed) profile. then
optimize (where needed). then profile.
--
Javier