This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How often are continuations created?


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]