Tail Call Elimination

Program-Transformation.Org: The Program Transformation Wiki
A function call as the last action of function body can be optimized by overwriting the stack frame of the caller. The callee returns directly to the caller of its caller. The gain of this program optimization is the stack space that is saved and a few instructions for restoring the return address and jumping to it. Tail recursion elimination is a special case.

-- EelcoVisser - 06 Dec 2001


CategoryOptimization