]> granicus.if.org Git - python/commit
OK, I couldn't stand it <0.5 wink>: removed all uncertainty about what's
authorTim Peters <tim.peters@gmail.com>
Mon, 1 Jul 2002 03:52:19 +0000 (03:52 +0000)
committerTim Peters <tim.peters@gmail.com>
Mon, 1 Jul 2002 03:52:19 +0000 (03:52 +0000)
commit19b74c786842ba11b9c99b2fd2f9fca2ebd785b5
tree19cc4e1f5e568584624159d4f6f4439b49ca6798
parent93cd83e4aed7b926cb04d1b656b094973ae3552b
OK, I couldn't stand it <0.5 wink>:  removed all uncertainty about what's
in gc_refs, even at the cost of putting back a test+branch in
visit_decref.

The good news:  since gc_refs became utterly tame then, it became
clear that another special value could be useful.  The move_roots() and
move_root_reachable() passes have now been replaced by a single
move_unreachable() pass.  Besides saving a pass over the generation, this
has a better effect:  most of the time everything turns out to be
reachable, so we were breaking the generation list apart and moving it
into into the reachable list, one element at a time.  Now the reachable
stuff stays in the generation list, and the unreachable stuff is moved
instead.  This isn't quite as good as it sounds, since sometimes we
guess wrongly that a thing is unreachable, and have to move it back again.

Still, overall, it yields a significant (but not dramatic) boost in
collection speed.
Modules/gcmodule.c