This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: How often are continuations created?
- To: guile at sourceware dot cygnus dot com
- Subject: Re: How often are continuations created?
- From: Keisuke Nishida <kxn30 at po dot cwru dot edu>
- Date: 09 Aug 2000 04:52:10 -0400
- References: <m3n1im7t4m.fsf@indy.STUDENT.CWRU.Edu>
Keisuke Nishida <kxn30@po.cwru.edu> writes:
> If thousands of continuations are created at once, the free list is
> immediately exhausted and new stack segments must be allocated from
> the heap, which is very expensive.
Hmm, it's not that expensive.
guile> (time (do ((n 5000 (1- n))
(list '() (cons (make-vector 512 #f) list)))
((< n 0) #f)))
clock utime stime cutime cstime gc
0.69 0.68 0.01 0 0 0.6
#f
My idea could waste a lot of memory, but it won't be a problem.
Okay, I'll try to implement this idea.