[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lisp performance was Re: problems with lisp

----- Original Message ----- 
From: "Russ Ross" <rgr22@cl.cam.ac.uk>

> It would be great if a compiler was smart enough (or a
> language design in a way that made it easier to do mechanically) to
> automatically figure out when it can convert a function to be tail
> recursive by passing an accumulator or something like that.

Take a look at Franklyn Turbak's thesis work on `Slivers'
(available at http://cs.wellesley.edu/~fturbak/pubs/index.html)
He was able to abstract out the synchronization of the recursive
computation so you could perform an operation like you describe.
The idea is that in either case, you are accumulating an answer,
either by implicitily accumulating over the recursion, or explicitly
passing around an accumulator.  So you can look at this sort
of computation as being parameterized on the type of accumulator.

This and a `sufficiently clever compiler'.....