This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: How often are continuations created?
- To: Keisuke Nishida <kxn30 at po dot cwru dot edu>
- Subject: Re: How often are continuations created?
- From: Jost Boekemeier <jostobfe at linux dot zrz dot TU-Berlin dot DE>
- Date: 09 Aug 2000 18:36:17 +0200
- Cc: guile at sourceware dot cygnus dot com
- References: <m3n1im7t4m.fsf@indy.STUDENT.CWRU.Edu>
Keisuke Nishida <kxn30@po.cwru.edu> writes:
> This algorithm is quite simple and must be efficient for both regular
> procedure calls and continuation calls, as long as there are sufficient
> stack segments on the free list.
Just use it. And please don't worry about continuations too much.
> The question is how often and how many continuations are created.
Depends. In the past people often used a CPS transformation and then
ran the optimizer. But it is possible (and probably better) to do the
optimizations in the source language. IMHO a translater which
translates an unstructured language like perl to scheme will
generate call/cc quite often.
> Is this a good idea to implement?
Just implement what you think is the simplest solution for you.
Clinger's hybrid model (use the stack for dynamic frames and the heap
for static frames) is also quite easy to implement, the only problem
is, that I don't have the paper, yet.
Jost