This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: fast continuations
- To: guile at sourceware dot cygnus dot com
- Subject: Re: fast continuations
- From: Keisuke Nishida <kxn30 at po dot cwru dot edu>
- Date: 04 Aug 2000 19:30:26 -0400
- References: <m3r986oxqg.fsf@indy.STUDENT.CWRU.Edu>
Hello,
I've found an article about continuations:
Representing control in the presence of first-class continuations
R. Hieb, R. Kent Dybvig and Carl Bruggeman.
http://www.acm.org/pubs/citations/proceedings/pldi/93542/p66-hieb/
Abstract: Languages such as Scheme and Smalltalk that provide
continuations as first-class data objects present a challenge to
efficient implementation. Allocating activation records in a heap has
proven unsatisfactory because of increased frame linkage costs,
increased garbage collection overhead, and decreased locality of
reference. However, simply allocating activation records on a stack and
copying them when a continuation is created results in unbounded copying
overhead. This paper describes a new approach based on stack allocation
that does not require the stack to be copied when a continuation is
created and that allows us to place a small upper bound on the amount
copied when a continuation is reinstated. This new approach is faster
than the naive stack allocation approach, and it does not suffer from
the problems associated with unbounded copying. For continuation-
intensive programs, our approach is at worst a constant factor slower
than the heap allocation approach, and for typical programs, it is
significantly faster. An important additional benefit is that recovery
from stack overflow is handled gracefully and efficiently.
Looks good for me. Is it a good idea to implement this?