[gclist] Precise GC's performance

Darius Blasband darius@phidani.be
Thu, 29 Feb 1996 20:54:17 +0100 (MET)


Hello everyone !

Following the (harsh) debate between precise and conservative GC's, I have
been measuring the real cost of precise GC as supported by YAFL. So, let's
try to be precise (:-) about what we measure: I have not been able to measure
the difference between the actual GC processes itself yet (Soon, I hope).
I did produce a version of the compiler which does not generate any
GC-related code, and I ran a set of benchmark programs with enough memory
so that GC is never called. Then, I ran the same set programs compiled
with the normal GC-aware code generation, and it appears that keeping track 
of the objects which are accessible at any given time (precise GC, thus)
costs 17% of the total execution time. Given a few simple optimizations, 
I think I can shrink this figure below the 15%, but I am not even sure
it is worth the trouble... 

By removing all the GC-related code, we implicitely enabled the compiler
to make far better use of hardware register, so even that factor has been
taken into account. It is true that this benchmark was run on an Intel
machine where there are not so many registers which can be allocated by
a compiler, we'll try on a Risc machine tomorrow. If the figures remain
of the same order of magnitude, I am pretty happy with it, and I would not
believe that a conservative CC is a reasonable alternative for YAFL.

The next benchmark I would like to try would be to compare the actual GC
in precise environment when compared to a conservative one. As soon as I
have a bit of free time, I'll try with Boehm's GC which should be rather
easy to plug in YAFL.

Well, that's is for now.

Darius