GC performance - was Re: [gclist] GC topics
Darius Blasband
darius@phidani.be
Thu, 22 Feb 1996 00:57:30 +0100 (MET)
>
> I think there are some major differences in our assumptions. If
> you are working with a closed system, then it is true that it is
> not hard to implement precise GC. How often do you get to do this?
> Your point is perhaps purely academic.
>
Not really. It is a production issue for real world systems, in a closed
world indeed.
> > - While it can be a pragmatic issue, I don't believe that the ability
> > to plug a GC in an existing system tells much about how easy it
> > can be to implement one.
>
> As it happens, it is also easy to write a conservative GC.
>
Well, I guess I must be dump, or misinformed, so please help me. My
initial idea of a conservative GC was about a system which does
scan memory, and uses heuristics to determine what might be valid pointers.
If this assumption is true, it maybe is easy, but seems like very low-level
stuff to me. How efficient can such a test be ?
It maybe is easy to write, but how easy would it be to optimize ? What
happens with portability ? If I am wrong regarding what such GC systems
are, please let me know.
> > - Quite amazingly, no one seems to mention the possible advantages of
> > precise GC.
>
> If there's no hope of using precise GC (because of uncooperative
> compilers and/or libraries) then its advantages, possible or actual,
> are not useful. Furthermore, it appears that most of the advantages
> are less dramatic than theory would predict. At least, that's what
> I get from reading papers by Wilson and by Boehm. There's also system
> costs -- if I use a conservative GC, I can, in practice, make use
> of an already-written compiler that performs a number of optimizations.
> If I use precise GC, that's probably not an option. The GC may be
> faster, but if the rest of the code is slower (because it is underoptimized)
> what's the point?
Well, the point is pretty easy to make: our compiler generates intermediate
C source files, and there is no contradiction between using a precise GC
and still have very decent performance.
How dramatic these advantages are ? Really, I don't know. If my assumption
about the conservative GC is right, then I really cannot expect such a
system to be even comparable with a precise GC.
Regards,
Darius