guile-user
[Top][All Lists]
Advanced

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

state of Guile GC


From: Julian Graham
Subject: state of Guile GC
Date: Mon, 17 Sep 2007 15:05:21 -0400

Hi Guilers,

Disclaimer: I don't know very much about Guile's garbage collector,
technically or historically, except for what I've gleaned by some
cursory inspection of the code looking for (magical, undocumented)
performance tricks.

So I know I'm kind of blundering in here, but I'm having some trouble
and don't really know what to do.  Specifically, I've got some
performance-sensitive (i.e., user-interactive) C code that uses Guile
for making calls to some Scheme libraries I've written, and those
calls are taking a prohibitively long time to complete.  Most of the
time, it takes <10ms (avg. 4ms) to complete, but when there's a GC (as
observed by doing logging in a GC "before" hook), the call can take
upwards of 100ms.

I realize that a lot of this has to do with the allocation profile of
my Scheme code, and I'm working on profiling it; I also know the GC's
supposed to be pretty transparent to the libguile user; nonetheless,
I'm hoping some Guile developers (Ludovic?) or some developers that
use Guile for interactive applications (Han-Wen?) could clear up a few
things for me:

* In 1.8, you guys removed scm_block_gc, and the comments in the
Changelog seem to indicate that this was a requirement because of the
way the redesigned GC interleaves itself with "Guile mode" C code.
Would it really be impossible to re-add some way of (temporarily)
disabling GC?

* Any suggestions from application authors on how to control the
behavior of the GC from C?  dsmith on #guile suggested that there
might be a way to trick Guile into thinking a GC wasn't necessary by
flubbing the GC stats somehow, but I couldn't figure out a way to do
that that looks portable.

* Out of curiosity, what are the technical / theoretical constraints
that make Guile's GC perform the way it does?  There are other
garbage-collected languages with (what I would imagine are) much
heavier allocation footprints (C#, Java) that seem to have much faster
GC.  (P'raps they collect in a separate thread?)  Do other Schemes do
things differently?

* What's the state of porting Guile to use Boehm GC?  I was following
Ludovic's research into it but things kind of trailed off about a year
ago when he posted some rather unhappy performance information.


Thanks a lot,
Julian




reply via email to

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