an idea to speed up GC
Zack Weinberg
zack@wolery.cumb.org
Sat Mar 11 12:00:00 GMT 2000
Garbage collection spends a good deal of time scanning over structures
that we know will never be deallocated - the global tree nodes, the
type hash, inline function bodies, etc. It seems to me we could speed
things up by teaching GC about this.
Suppose we add a second set of mark bits, call it the frozen set. You
can ask the garbage collector to mark some structure, or all of the
roots, and then copy the mark bits to the frozen bits. Then, instead
of clearing all the mark bits at the start of a GC run, we copy the
frozen bits to the mark bits.
Does this sound worthwhile?
zw
More information about the Gcc
mailing list