Say I have code like this:
X + Y - 10;
Say I run that in my main game loop (few hundred times per second if not more).
Say neither X or Y change in a great while. Will that get calculated each time or is it smart enough to cache that internally and only recalculate it if either X or Y has changed?