On 8/19/05, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi all.
> 
> What is a simple but accurate way to measure the
> time spent in the garbage collector?

The `time' macro should give you (major) GC times, fairly accurately,
unless it's buggy. A more low-level approach is:

(define (gc-time proc)
  (##sys#start-timer)
  (proc)
  (##sys#slot (##sys#stop-timer) 1) )

> 
> (Background: I would like to gain some facts so that I can
> tell Felix (who asked for areas of improvement for Chicken :-) ):
> "My precious programs spend NN% in the GC. Can we improve that?")
> 

Well, Chicken is mostly about GC. Minor GC's are *needed' to clean up
the stack and give the "illusion" of proper tail calls.
Alternatively: reduce memory load (for example by evicting static data into
the non-GC'd heap).


cheers,
felix


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to