M. Edward (Ed) Borasky wrote:

> On Wed, Apr 1, 2009 at 6:00 AM, Charles Oliver Nutter
> <charles.nutter / sun.com> wrote:
>> Well, according to the earliest drafts of the Ruby standard,
>> continuations are not part of "core Ruby" :)
>>
>> But yes, this is one area we've opted not to be compatible in exchange
>> for performance. We could implement continuations, but we'd be several
>> times slower as a result.
> 
> IIRC YARV also dropped continuations because they would be slow on the
> YARV VM as well.

Which YARV do you mean? The one integrated into Ruby 1.9? :)
So I know for sure that Ruby 1.9 still has continuations, that they rule the 
world when compared against Ruby 1.8 continuations (which had memory leaks), 
and that Ruby 1.9 it is based on Koichi's YARV. ;-)

  ruby19 -rcontinuation -e 'callcc {|cc|$cc=cc}; p "Hallo Welt"; $cc.call'

> Which does raise an interesting point, though. Call/cc has been
> standard equipment on Scheme for years and nobody has complained about
> performance. How did Ruby manage to paint itself into a "slow
> continuation" corner?

Continuations in Ruby before 1.9 were mainly slow because they leaked 
memory. The GC turned the whole program into a slow program. This is no 
longer the case. I did some tests with my continuation-based web framework 
Wee here [1] (both with Ruby 1.8 and 1.9).

Regards,

  Michael

[1]: http://www.ntecs.de/blog/articles/2009/02/25/wee-ruby-1-9-and-
continuations/