[issue39143] Implementing sub-generation steps in the gc

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


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

> For example, break the youngest generation into parts A & B.  Newly tracked items are added to part A.  When a collection occurs, only part B participates from the youngest generation.  When the collection ends, part A is renamed to part B, and part A is marked empty (just a handful of pointer manipulations).

Well, this seems simple enough to fully implement just to try it out to benchmark a bit. I will start doing some experiments with it.

> Beyond that most objects "die young", which appears overwhelmingly truer than not across almost all Python programs, I'm not sure anything else about lifetime distribution is generally exploitable.

In theory, sub-generation steps will make use of "most object die young", specifically it will try to make it happen more often, as this issue can be summarized on "some objects that should die young don't because they were in a collection at the wrong time and now they need to wait even more".

----------

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


More information about the Python-bugs-list mailing list