Tail call optimization (TCO) is seriously underrated. When you write your recursive calls, ensure that the last action of the function is the recursive call itself, with no additional computation after it. If you do that, the compiler can reuse the current function's stack frame for each call, which makes …