lua-users home
lua-l archive

Re: Function environment table interface

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


On 2009年7月06日 17:44:07 -0400
Doug Rogers <doug.rogers@elbitsystems-us.com> wrote:
> IMHO, the short reply to the original question is "performance". 
> Requiring the attachment of a metatable for __env would levy the 
> overhead of a table lookup, possibly a chain of them due to __index,
> for each function call.
Or at least each function call to a function that had a metatable; a
check for such a thing shouldn't be expensive, and short-circuiting
things like this has been discussed before.
B.

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