Skip to content

Performance regression with cyclic GC vs 3.13 #129210

@nascheme

Description

@nascheme

Bug report

Bug description:

While working on the free-threaded GC, I noticed this performance regression with the default build GC. Running the attached script (bm_gc_collect.py) with the main branch of Python shows much worse performance vs 3.13. I get 20.8 seconds for the main branch and 3.3 seconds for 3.13. Adding gc.disable() before calling benchmark_collection() seems to fix it.

bm_gc_collect.py.txt

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagetype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions