[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua way to do this code
- From: Elias Barrionovo <elias.tandel@...>
- Date: Thu, 18 Oct 2012 14:14:58 -0300
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!