This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
an idea to speed up GC
- To: gcc at gcc dot gnu dot org
- Subject: an idea to speed up GC
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Sat, 11 Mar 2000 12:00:07 -0800
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