[racket] generator performance

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Sep 18 20:52:50 EDT 2012

At Tue, 18 Sep 2012 20:46:40 -0400, Eli Barzilay wrote:
> A few minutes ago, Matthew Flatt wrote:
> > 
> > Using `call/cc' for generators is effectively a hint to the run-time
> > system that the continuation doesn't need to compose. That hint is
> > useful only because of the way that continuations are implemented
> > internally.
> So `call/cc' is faster than one of the delimited ones?
> -- I tought that the main cost would be in the amount of stack saved
> which would make delimited ones faster,

There's no such thing as an un-delimited continuation in Racket. A
continuation captured with `call/cc' is delimited by a prompt, just
like a continuation captured with `call-with-composable-continuation'.

The difference is whether the continuation is composable (at a boundary
other than a prompt).

Posted on the users mailing list.