This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: boehm & guile, success report.
- To: Michael Livshin <mlivshin at bigfoot dot com>
- Subject: Re: boehm & guile, success report.
- From: Han-Wen Nienhuys <hanwen at cs dot uu dot nl>
- Date: Tue, 18 Jul 2000 14:16:00 +0200 (CEST)
- Cc: guile at sourceware dot cygnus dot com
- References: <14708.16528.532598.604749@dokkum.cs.uu.nl><s3n1jfoe3a.fsf@bigfoot.com>
- Reply-To: hanwen at cs dot uu dot nl
mlivshin@bigfoot.com writes:
> hello, the fearless one.
[uhh, is that me?]
> > It was actually very easy to do, replacing guile's GC only involves
> > deleting some of code :-) -- it doesn't track weak refernces, and I
> > wonder it does the correct thing wrt structs, but I succesfully booted
> > GUILE with it.
>
> I don't have any time right now to actually look at the code, so I
> hope you don't mind me asking here:
>
> how do you deal with cells? if you use the Boehm collector
> simplistically, with the default settings, then I'd assume that a
> reference to one cell retains a whole segment. right?
I don't deal with anything, Boehm is designed to be a drop-in
replacement for malloc. Since I expect that lots of C programs also
allocate large numbers of small obejcts, it should work reasonably
with GUILE.
> > I do think it is a major win if GUILE uses it:
> > * generational GC
> I believe we can do *much* better, but that's indeed something.
One of my colleagues did a literature survey on GC, and found out that
most compilers and interpreters got better by dropping their in-house
developed gc in favor of BGC. In any case Bigloo also uses BGC, so it
should be feasible.
>
> > * no more weird distinctions between stack and heap
>
> it's not weird at all, IMHO.
it is. It gets very messy if you have a C++ program that allocates specific
structures both on the heap, and on the stack, and as a compound
object on the heap.
(Yes, I know , C++ sucks. You should have told me 5 years ago)
> > I couldn't get the benchmark package to work (can someone look at this
> > some time? I 'd like to run a benchmark by doing
> >
> > my_guile BENCHMARKDIR/benchmark.scm BENCHMARKDIR gc ports
>
> well, you could implement `gc-stats' by translating Boehm's statistics
ah stupid me. I forgot that it used gc-stats.
http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_bench/
contains a benchmark for GC in scheme. Maybe I'll have a look.
--
Han-Wen Nienhuys | hanwen@cs.uu.nl | h>ttp://www.cs.uu.nl/~hanwen/