[PRL] MSFT gives Joe Marshall kudos, decides Appel was right after all

Joe Marshall jmarshall at alum.mit.edu
Fri Jun 2 18:55:02 EDT 2006


On 6/2/06, Dave Herman <dherman at ccs.neu.edu> wrote:
> > The problem is not the stack, per se; it's the bogus notion that you
> > push on entry and pop on exit.
>
> Ryan and Will have helped beat this assumption out of my brain by now
> (oh, the years of C-induced brain damage...) but I'm not sure I
> appreciate its gravity.
>
> Certainly, leaf procedures may account for a huge percentage of an
> execution trace, and many/all of those leaf procedures may not require a
> stack frame. So I can see how this would be a big efficiency gain. But
> is it just a "God, implementors are wasteful" point, or is there some
> deeper (say, semantic) reason why this is significant?

Yes.

You are still thinking in terms of a `call tree' that has `leaf
procedures'.  In the `push-on-entry' world your control flow *must* be
a call tree, but with proper tail recursion your control flow is no
longer constrained to be a tree --- it can be a directed
graph with arbitrary cycles.  Clearly this is a much more flexible structure.

-- 
~jrm



More information about the PRL mailing list