]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-132657: Add maybe_enable_deferred_ref_count() (gh-142843)
authorNeil Schemenauer <nas-github@arctrix.com>
Sat, 17 Jan 2026 01:54:43 +0000 (17:54 -0800)
committerGitHub <noreply@github.com>
Sat, 17 Jan 2026 01:54:43 +0000 (01:54 +0000)
commitbb25f7280af30831fffa3345b4fc93798949c6c6
tree2a1de1473454a1343b8440310594dc8e7389d6f5
parent949b5ec8e6136c125b12566d869307899ba1c3b4
gh-132657: Add maybe_enable_deferred_ref_count() (gh-142843)

If we are specializing to `LOAD_GLOBAL_MODULE` or `LOAD_ATTR_MODULE`, try
to enable deferred reference counting for the value, if the object is owned by
a different thread.  This applies to the free-threaded build only and should
improve scaling of multi-threaded programs.
Include/internal/pycore_dict.h
Misc/NEWS.d/next/Core_and_Builtins/2025-12-24-13-19-16.gh-issue-132657._P4DDb.rst [new file with mode: 0644]
Objects/dictobject.c
Python/specialize.c
Tools/ftscalingbench/ftscalingbench.py