lua-users home
lua-l archive

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


Hi,

if I got everything right, it should be valid to have only
one closure for all instances of one function if it has no
upvalues.  Especially for function statements within loops
this could greatly reduce the number of short living clo-
sures.

The struct Closure could either be directly attached to the
Proto struct or created once (first time a closure is need-
ed) and then a reference is stored in the Proto so that it
can be reused the next time.

Or did I miss anything?

Ciao, ET.