Quantcast WoWInterface - View Single Post - About add-ons optimization
View Single Post
08-24-13, 12:57 PM   #11
A Frostmaul Preserver
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 289
Originally Posted by Rainrider View Post
So, assumed I cannot move the calculation involving MAX_COMBO_POINTS, it's better to define it outside the loop so that I could spare the global look-up on every loop iteration.

Originally Posted by Rainrider View Post
If it would be a local function call, or a local table look-up or a literal, I shall declare the variable for this in the loop. Is this the right way to sum it up?
If the variable is dependent on i in some way then define it in the loop, otherwise it would be defined outside as its value will not change during the loop.
  Reply With Quote