At Tue, 18 Sep 2012 21:05:57 -0400, Eli Barzilay wrote: > 10 minutes ago, Matthew Flatt wrote: > > 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'. > > Yeah -- I mean that `call/cc' usually has more context, so it seems > that it would be generally more expensive, and that seems wrong--?
Sorry --- I still don't see what you mean. The original and revised code include a prompt (or `reset') in the same place relative to the `shift' or `call/cc', so the delimiting prompt and the size of the delimited continuation is the same in each case. ____________________ Racket Users list: http://lists.racket-lang.org/users