[gambit-list] Closures, continuations, strategies, and actual

David Rush kumoyuki at gmail.com
Sun May 24 03:37:17 EDT 2009


2009/5/23 D.McClain <dbm at asyrmatos.com>:
> 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
-- 
GPG Public key at http://cyber-rush.org/drr/gpg-public-key.txt



More information about the Gambit-list mailing list