diff options
author | Sam Gross <colesbury@gmail.com> | 2025-03-26 14:38:47 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-26 14:38:47 -0400 |
commit | 67fbfb42bd5dfe861d0c58d9e6c48d8eef033d24 (patch) | |
tree | 282178fa55571c055c8327dc3d77fa6a882a404b /Python/getplatform.c | |
parent | 3d4ac1a2c2b610f35a9e164878d67185e4a3546f (diff) | |
download | cpython-67fbfb42bd5dfe861d0c58d9e6c48d8eef033d24.tar.gz cpython-67fbfb42bd5dfe861d0c58d9e6c48d8eef033d24.zip |
gh-131586: Avoid refcount contention in some "special" calls (#131588)
In the free threaded build, the `_PyObject_LookupSpecial()` call can lead to
reference count contention on the returned function object becuase it
doesn't use stackrefs. Refactor some of the callers to use
`_PyObject_MaybeCallSpecialNoArgs`, which uses stackrefs internally.
This fixes the scaling bottleneck in the "lookup_special" microbenchmark
in `ftscalingbench.py`. However, the are still some uses of
`_PyObject_LookupSpecial()` that need to be addressed in future PRs.
Diffstat (limited to 'Python/getplatform.c')
0 files changed, 0 insertions, 0 deletions