]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-142531: Fix free-threaded GC performance regression (gh-142562)
authorNeil Schemenauer <nas-github@arctrix.com>
Thu, 11 Dec 2025 20:30:56 +0000 (12:30 -0800)
committerGitHub <noreply@github.com>
Thu, 11 Dec 2025 20:30:56 +0000 (12:30 -0800)
commite38967ed60778146050cc88dd16b70bfd867fde7
treece103b66df8c62ccf8fd09dadd597e2e7ce35770
parentaf185727b2a4aeb39ba0c323588be495d8cc2e19
gh-142531: Fix free-threaded GC performance regression (gh-142562)

If there are many untracked tuples, the GC will run too often, resulting
in poor performance.  The fix is to include untracked tuples in the
"long lived" object count. The number of frozen objects is also now
included since the free-threaded GC must scan those too.
Lib/test/test_gc.py
Misc/NEWS.d/next/Core_and_Builtins/2025-12-10-23-03-10.gh-issue-142531.NUEa1T.rst [new file with mode: 0644]
Modules/_testinternalcapi.c
Python/gc_free_threading.c