lua-users home
lua-l archive

[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!