[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: local by default?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 29 Apr 2002 17:12:24 -0300
> Just out of curiosity, there is a good reason to create two classes of
> Why not having a locals table for each function and create
> them at run time?
Lua local variables are ~3 times faster than global (table field)
variables, without counting the time to create/collect those tables.
Moreover, the "unit" of scope in Lua is a block, not a function (so you
would need several tables for each function...)