More than 200 local variables
View Single Post
02-11-20, 11:38 AM
A Cobalt Mageweaver
Join Date: Oct 2010
Originally Posted by
The entire appeal of using local variables aside from limiting scope is you save an index lookup in the global table. Putting variables in a local table completely negates this since you're re-adding the index operation you were trying to save.
Yes, but in this case the number of local variables exceeds Lua's capacity for a single scope. I mean, if you're using 200+ local variables a table can be upvalued no differently and though table lookups aren't as fast as a local variable it's not using 200+ local variables.
"I have not failed, I simply found 10,000 ways that did not work." - Thomas Edison
View Public Profile
Send a private message to jeruku
Find More Posts by jeruku