lua-users home
lua-l archive

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


On Tue, Apr 7, 2015 at 4:11 PM, Dibyendu Majumdar
<mobile@majumdar.org.uk> wrote:
> That's very interesting ... so essentially it is allowing user to
> define metatable only once - no changes allowed, so then it is free to
> optimise the way the metatable is used?


i guess that's the motivation for the restriction: since it knows the
methods won't change, it's free to do the table fetch only once and
compile a straight function call (which could even be flattened away
by the trace compiler)

-- 
Javier