Skip to content

gh-112075: use per-thread dict version pool - #118676

Merged
DinoV merged 2 commits into
python:mainfrom
DinoV:nogil_dict_version
May 7, 2024
Merged

gh-112075: use per-thread dict version pool#118676
DinoV merged 2 commits into
python:mainfrom
DinoV:nogil_dict_version

Conversation

@DinoV

@DinoVDinoV commented May 6, 2024

Copy link
Copy Markdown
Contributor

We want to avoid contention on the dict version. This moves to using a per-thread pool of 256 dict versions that we can allocate from without hitting the atomic operation for the main thread.

Comment threadInclude/internal/pycore_dict.h Outdated
@DinoV
DinoVforce-pushed the nogil_dict_version branch from 4d6906a to adb5e13CompareMay 6, 2024 23:43
@DinoV
DinoV enabled auto-merge (squash) May 7, 2024 00:00
@DinoV
DinoV merged commit ff6cbb2 into python:mainMay 7, 2024
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
@DinoV
DinoV deleted the nogil_dict_version branch May 31, 2024 18:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@DinoV@colesbury