Skip to content
IJK

Generational or Incremental GC in CPython: The Stated Trade-Off

By IJK ·

The trade-off the Language Summit 2026 write-up states between generational and incremental collectors, and what the discussion said about changing CPython's collector.

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]

Generational collectorlower memory usage, higher pause timesIncremental collectorshorter pauses, more memory
What does each kind of collector trade away, according to the write-up?

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

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)

Editorial (AI-assisted; automatically checked, not human-reviewed). Each statement is linked to its source; check the source before relying on a detail.

  • python
  • cpython
  • garbage collection
  • memory