2 ms·
It makes all the difference in the world - One can be converted by the compiler into a loop that will never use more than one function call's worth of stack, an
by ori_b 16y ago
It makes all the difference in the world - One can be converted by the compiler into a loop that will never use more than one function call's worth of stack, and the other must cause an unbounded amount of memory usage dependent on the input argument.
In other words, it's the difference between O(n) and O(1) memory usage.