[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: continuations, was Re: Google Summer of Code 2011
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 22 Feb 2011 17:53:59 -0300
> > The weird performance implications caused by first-class continuations are
> > the need for a garbage-collected stack, or an expensive stack-copy
> > operation when a continuation is used in a difficult manner.
> >
>
> Several implementations of first-class continuations only have an
> extra cost if you use them. Even so, full, unbounded stack copies are
> the most naive implementation and not used in good compilers.
Lua cannot afford what you call a "good" compiler. Coroutines give us
most of the advantages of continuations (as they are equivalent to
one-shot continuations) with a trivial implementation.
-- Roberto