should go a long way toward explaining why CPS code may be slower than
direct form code.
I have not yet read the paper, but it appears that there is a
terminological disconnect happening here.
In Scheme, I program using CPS precisely because it is in fact
*faster*. Specifically, I have show it to be faster when compiling
using Stalin. However, this performance increase is not a direct
result of the CPS idiom, but due to the fact that monomorphic data
extents are clearly defined - allowing Stalin more aggressive
optimizations.
Note that I am *not* using CPS to implement *continuations*. But I am
using the CPS idiom in cases where a caller knows quite a bit more
about type-appropriate behavior than the (ultimate) callee. Such
conditions are often used as examples of when call/cc is helpful (e.g.
in implementing exceptions).
The point being that there is a long difference between programming in
a CPS idiom and reifying continuations with call/cc. Saying CPS code
is slower is simply silly and makes you look like a troll.
david rush
--