What the collector has to do
Reference counting is already collecting dead objects, therefore the garbage collector should only have to find dead unreachable cycles. [1]
The garbage collector is a “backup” and “should be much faster”. [2]
The trade-off between the two collectors
Mark then turned to explaining the now-reverted incremental garbage collector. [3]
This garbage collector was a non-generational collector, meaning there was only a single generation that contained the whole heap. [4]
The trade-off is that non-generational GCs have a negative impact on memory usage. [5]
Generational garbage collectors have lower memory usage overall but suffer from higher pause times, whereas incremental garbage collectors pause for less time but at the expense of more memory. [6]
What the discussion said about changing it
Donghee Na was concerned that any changes to the garbage collector would cause issues for someone. [7]
Donghee wondered whether there was a way to implement a transition period between different garbage collectors. [8]
Mark answered that there’s nothing inherently “wrong” with the current garbage collector and that the primary issue would be that there would be “more code to maintain”, but he would prefer providing a GC that is better by default unless users are fine-tuning the GC themselves. [9]
Sources
- The Python Software Foundation source says: Reference counting is already collecting dead objects, therefore the garbage collector should only have to find dead unreachable cycles. Garbage Collection: Generational? Incremental? Both! (Python Language Summit 2026)
- The Python Software Foundation source says: The garbage collector is a “backup” and “should be much faster”. Garbage Collection: Generational? Incremental? Both! (Python Language Summit 2026)
- The Python Software Foundation source says: Mark then turned to explaining the now-reverted incremental garbage collector. Garbage Collection: Generational? Incremental? Both! (Python Language Summit 2026)
- The Python Software Foundation source says: This garbage collector was a non-generational collector, meaning there was only a single generation that contained the whole heap. Garbage Collection: Generational? Incremental? Both! (Python Language Summit 2026)
- The Python Software Foundation source says: The trade-off is that non-generational GCs have a negative impact on memory usage. Garbage Collection: Generational? Incremental? Both! (Python Language Summit 2026)
- The Python Software Foundation source says: Generational garbage collectors have lower memory usage overall but suffer from higher pause times, whereas incremental garbage collectors pause for less time but at the expense of more memory. Garbage Collection: Generational? Incremental? Both! (Python Language Summit 2026)
- The Python Software Foundation source says: Donghee Na was concerned that any changes to the garbage collector would cause issues for someone. Garbage Collection: Generational? Incremental? Both! (Python Language Summit 2026)
- The Python Software Foundation source says: Donghee wondered whether there was a way to implement a transition period between different garbage collectors. Garbage Collection: Generational? Incremental? Both! (Python Language Summit 2026)
- The Python Software Foundation source says: Mark answered that there’s nothing inherently “wrong” with the current garbage collector and that the primary issue would be that there would be “more code to maintain”, but he would prefer providing a GC that is better by default unless users are fine-tuning the GC themselves. Garbage Collection: Generational? Incremental? Both! (Python Language Summit 2026)