Tail recursion is a powerful optimization since it typically improves both execution time and memory usage for recursive calls. It can also be your enemy if you forget about it.

Read more here.