On Fri, Aug 8, 2014 at 1:17 PM, Mason Mackaman
<masondeanm@aol.com> wrote:
So if I make a local _ENV2 and set _ENV2.string=string, will calling _ENV2.string take the same amount of time/steps as calling ‘string'?
Yes. Calling
string,
_ENV.string, and your
_ENV2.string generate identical sequences of opcodes (note that this wasn't the case before Lua 5.2). It's outlined in the language documentation here:
http://www.lua.org/manual/5.2/manual.html#2.2.
(Sorry for the double-reply. Meant to send the link along with the previous reply, but I hit send too soon by accident.)