[issue39143] Implementing sub-generation steps in the gc

Pablo Galindo Salgado report at bugs.python.org
Sat Dec 28 12:33:21 EST 2019


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

> I think we only need about 5 bits to store the age of each object ,  do we really need to increase the object back to two word per object ?

5 bit *per object* is a lot because it scales with the number of objects. It will quickly obliterate any gain that we get from some objects being deallocated sooner (which is what we are trying to achieve). Using inter-generations has a constant cost that is negligible. 

> Am actually in favour of this Shaw’s steps scheme though it may also mean the more delays we want, the more steps we need to create and manage while changing the age threshold for objects looks simpler than creating and managing steps.

I will propose maybe to only do sub-steps for the first generation (as many papers suggest that is where the bigger gains are). I am not sure what you mean with "changing the age threshold for objects looks simpler than creating and managing steps". If you mean changing the generational threshold, I think that does not fix the problem as it only delays or speeds up collections but the problem is scale-invariant with the number of objects.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39143>
_______________________________________


More information about the Python-bugs-list mailing list