Le mar. 23 juin 2020 à 20:37, Neil Schemenauer
My thinking is that, eventually, we would like to allow CPython to use something other than reference counting for internal PyObject memory management. In other systems with garbage collection, the memory allocator is typically tightly integrated with the garbage collector. To get good efficiency, they need to cooperate. E.g. newly allocated objects are allocated in nursery memory arenas.
The PEP 620 only mentions replacing CPython GC with a tracing GC at one place: "It becomes possible to experiment with more advanced optimizations in CPython than just micro-optimizations. For example, tagged pointers, and replace the garbage collector with a tracing garbage collector which can move objects." I chose to not make it a requirement of the PEP 620 on purpose. IMHO such a change will very likely require a whole PEP by itself, since there are likely many small things which will have to be changed to prepare such a major change. Victor -- Night gathers, and now my watch begins. It shall not end until my death.