chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] How to measure time spent in the garbage collector?


From: felix winkelmann
Subject: Re: [Chicken-users] How to measure time spent in the garbage collector?
Date: Fri, 19 Aug 2005 22:15:43 +0200

On 8/19/05, address@hidden
<address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]