The Wayback Machine - https://web.archive.org/web/20260219112603/https://github.com/python/cpython/pull/118676
Skip to content

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

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

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

Conversation

@DinoV
Copy link
Contributor

@DinoV DinoV commented May 6, 2024 •

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.

@DinoV DinoV force-pushed the nogil_dict_version branch from 4d6906a to adb5e13 Compare May 6, 2024 23:43
@DinoV DinoV enabled auto-merge (squash) May 7, 2024 00:00
@DinoV DinoV merged commit ff6cbb2 into python:main May 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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Comments