tail recursion optimisation

Computing Dictionary

tail recursion optimisation definition

programming
(TRO) Discarding the calling environment (call stack frame) when the last thing a function or procedure does is to call itself. This is important when a procedure calls itself recursively many times since, without tail recursion optimisation, the environments of earlier invocations would fill up the memory only to be discarded when (if) the last call terminated.
Tail recursion optimisation is a special case of last call optimisation but it allows the further optimisation that some arguments may be passed in situ, possibly in registers. It allows recursive functions to be compiled into iterative loops.
See also conversion to iteration, tail recursion modulo cons.
(2006-04-16)
The Free On-line Dictionary of Computing, © Denis Howe 2010 http://foldoc.org
Cite This Source
Explore Dictionary.com
Previous Definition: tail recursion modulo cons
Next Definition: tail rhyme
More from Thesaurus.com
Synonyms and Antonyms for tail recursion optimisation
More from Reference.com
Search for articles containing tail recursion optimisation
Dictionary.com Word FAQs

Dictionary.com presents 366 FAQs, incorporating some of the frequently asked questions from the past with newer queries.

Copyright © 2014 Dictionary.com, LLC. All rights reserved.
  • Please Login or Sign Up to use the Recent Searches feature