GC tweaks
Henry Cejtin
henry@sourcelight.com
Fri, 29 Jun 2001 03:22:11 -0500
As a hack experiment, I combined gc.c, GC_size.c and GC_world.c into one
file, then replaced all the function pointer arguments with integers and
replaced the calls to switch statements. I checked that if I inlined these
functions then gcc would figure it all out and inline everything. There was
some uglyness with getting the order right in the source, but it seems to
have worked. I think used this gc-mongo.o to make a new mlton-compile (and
world.mlton) and then did a self compile with it. On my machine, Red Hat 7.1
with 512 meg of RAM, the time are:
total GC time
old 879.42 279.29
new 835.31 243.90
The `old' one includes my previous GC hacks. Thus we get 5% over all and 15%
of GC time. Yawn. The code size increase was under .1%. My guess is that
there really is a lot more to get here, but clearly it will take a real re-
write of the GC, and as Stephen said, in that case making it generational is
probably the way to go.