in reply to Very basic question on performance
G'day morrin,
"I guess I'm asking the reasoning behind it, and whether it should have much of an impact if we were repeating similar a lot of times, not to just measure it"
There's a built-in module called Benchmark which can run these multiple times and provide a comparison of running times.
My guess is that the first will be slower. The reason being that you're declaring six variables and assigning values to them in addition to the arithmetic which is common to both subroutines.
-- Ken
|
|---|