lua-users home
lua-l archive

Re: avoid table lookups?

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


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

AltStyle によって変換されたページ (->オリジナル) /