Tail Call Optimization

Why Trust Techopedia

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

Margaret Rouse
Technology Specialist
Margaret Rouse
Technology Specialist

Margaret is an award-winning writer and educator known for her ability to explain complex technical topics to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles in the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret’s idea of ​​a fun day is to help IT and business professionals to learn to speak each other’s highly specialized languages.