From Recursion to Iteration: What are the Optimizations?
Loading...
Files
Can’t use the file because of accessibility barriers? Contact us
Date
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Permanent Link
Abstract
Transforming recursion into iteration eliminates the use of stack frames during program execution. It has been studied extensively. This paper describes a general and powerful method, based on incrementalization, for transforming general recursion into iteration: identify an input increment, derive an incremental version under the input increment, and form an iterative computation using the incremental version. Exploiting incrementalization yields iterative computation in a uniform way and also allows additional optimizations to be explored cleanly and applied systematically, in most cases yielding iterative programs that use constant additional space, reducing additional space usage asymptotically. We summarize major optimizations, complexity improvements, and performance measurements. Our analyses and measurements show that some previously considered ``optimizations'' can actually result in slower programs.
Table of Contents
Description
Keywords
Citation
Journal
DOI
Link(s) to data and video for this item
Relation
Rights
This work is protected by copyright unless stated otherwise.