Video - Tail Recursion
There is a powerful optimization available if you structure your recursion the right way. It’s called tail recursion, and it enables the compiler to convert the recursion into a loop in the compiled assembly code.
There is a powerful optimization available if you structure your recursion the right way. It’s called tail recursion, and it enables the compiler to convert the recursion into a loop in the compiled assembly code.