Quantcast WoWInterface - View Single Post - More than 200 local variables
View Single Post
02-11-20, 11:38 AM   #6
A Cobalt Mageweaver
jeruku's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 215
Originally Posted by SDPhantom View Post
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
  Reply With Quote