Tail Call Optimization

What Does Tail Call Optimization Mean?

Tail call optimization is the specific use of tail calls in a function or subroutine that eliminate the need for additional stack frames. Tail call optimization can be part of efficient programming and the use of the values that subroutines return to a program to achieve more agile results or use fewer resources.

Advertisements

Tail call optimization is also known as last call optimization.

Techopedia Explains Tail Call Optimization

In tail call optimization, the end value returned by the subroutine is used in a particular way. This tail call, the last value or result to be returned, may get funneled into an additional subroutine involving a particular function call. When the tail call results in the same subroutine being run again, this is referred to as tail call recursion.

Tail call optimization can be a part of best practices for programming. In general, the use of the tail call is a specific technique that engineers and developers can use to affect the final quality of code, for example, the length of a program or its clarity and transparency.

Advertisements

Related Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…