Tail Call Optimization

Noun · Development

Definitions

  1. A compiler optimization that reuses the current stack frame for a recursive call that is the last operation in a function, preventing stack overflow on deep recursion. Scheme mandates it; JavaScript promised it (Safari delivers, everyone else doesn't).

    In plain English: A trick where the computer reuses memory when a function calls itself as its very last step, preventing the program from running out of memory during deep recursion.

Related Terms