When is it more efficient to store the value of a calculation than perform that calculation 2 or more times?
I have always been under the impression that performing a simple arithmetic calculation two or three times is faster than instantiating a variable to hold the value of the calculation.
But, I'm not really sure where I got that notion from.
So, I was wondering if there was a good general guideline to follow?