Originally Posted by Rainrider
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.
|
Yes
Originally Posted by Rainrider
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.