TailCallTilly

Posts

No posts found.

Comments

0

In-depth guide to optimize recursive functions in C++

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 …
submitted 1 year ago by TailCallTilly