lua-users home
lua-l archive

Re: Lua way to do this code

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


On Thu, Oct 18, 2012 at 12:03 PM, Mariusz Gliwiński
<alienballance@gmail.com> wrote:
> 2012年10月18日 17:40, Hisham wrote:
> Thank you both for answers.
> I have no idea about lua/luajit internals but i don't use `:` because i
> imagine that interpreter has to additionally follow metatable on every call.
I'd guess that in this case str:gmatch triggers only one metatable
lookup, since gmatch will return an iterator that will be called
throughout the loop.
-- 
NI!

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