4 ms·
I've never heard of tail recursion being used as a performance optimization. Generally it's required to prevent a recursive function from blowing the stack. It
by julesnp 8y ago
I've never heard of tail recursion being used as a performance optimization. Generally it's required to prevent a recursive function from blowing the stack.
Iteration is usually more performant than recursion, but doesn't mix well with immutability.
- Technetium_Hat 8y agoTail calls _are_ iteration, just expressed as a function.