Performance - Run calculation once instead of in the loop.