[Top][All Lists]

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

Re: Guile + Boehm GC: First Remarks

From: Han-Wen Nienhuys
Subject: Re: Guile + Boehm GC: First Remarks
Date: Thu, 1 Jun 2006 01:10:10 +0000 (UTC)

In article <address@hidden>,
Ludovic Courtès <address@hidden> wrote:
>* GC Stats
>  I haven't thought much about this, but it looks is quite problematic.
>  We probably can't provide the level of details of `gc-stats'.  And we
>  cannot either provide per-object-type information as currently
>  provided by `gc-live-object-stats' (this would require registering a
>  finalizer for each and every object in order to update the object
>  count).
>  OTOH, per-object-type information, when needed, can be obtained by
>  writing code that makes use of one of the finalization mechanism.  For
>  instance, one can wrap a type constructor, or a class `initialize'
>  method, so that every new instance is added to a guardian; then, said
>  guardian can be periodically queried to update the instance counter.

>I haven't done any serious performance measurement, but just to give an
>idea, the test suite roughly takes as long to run with the current Guile
>and with GBGC.  However, GBGC seems to be slightly slower when running
>programs that allocate and discard lots of cells:


The per object GC stats are a hack of mine, and although I would be
sad to see it go (it makes debugging memory leaks easier), I think
getting BGC is worth it.  I don't see the point of the general GC
stats.  I think I've never ever used it.

Isn't it is possible to get other lowlevel statistics, or a list of
live objects from BGC?

>  $ time ../pre-inst-guile -c "(use-modules (srfi srfi-1)) (fold (lambda (x y) 
> (list x)) '() (iota 300000)) (exit 0)"
>  real    0m3.550s
>  user    0m3.383s
>  sys     0m0.162s
>  $ time guile-1.8.0 -c "(use-modules (srfi srfi-1)) (fold (lambda (x y) (list 
> x)) '() (iota 300000)) (exit 0)"
>  real    0m2.738s
>  user    0m2.650s
>  sys     0m0.059s

there is a more useful benchmark at

It's part of a suite by Hans Boehm of GC benchmarks, and I think you can
find more Scheme transliterations on the net.

reply via email to

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