There is a lot of work on this in the literature on functional
languages, where rewriting recursions can lead to aymptotic speedups.
Often the idea is to get from a general recursion to tail recursion in
order to avoid stack growth and value copying.

Reply via email to