comments
Suresh Jagannathan
suresh@emphora.net
Wed, 14 Mar 2001 15:56:33 -0500
>
> > 4. I was a bit confused by the loop example, in particular
> > because contification appears superficially to have the
> > same effect as inlining here -- wouldn't we get the same
> > code structure (after simplification) as you would if
> > you inlined loop within sum?
>
> Loop is recursive. What do you mean by inlining it? Should we
> mention something to avoid this confusion?
A syntactic inliner would have inlined loop at the call
to sum even though its body has a recursive call; the effect
would be the same (I think) as it turning it into a jump lambda
(i.e,. cont) esp. wrt lifting the call to length outside the
recursive loop.
The meta-level comment here is that anyone who
isn't very familiar with contification might be confused
(legitimately, I think) into questioning whether the end
effect of contification is any different from what a better
known aggressive code-motion optimization like inlining
might achieve.
It's not a big deal, but I think it would be nice to add
a bit of clarification about what the differences are.