Skip to content

gh-143732: allow dict subclasses to be specialized #148128

Open
kumaraditya303 wants to merge 5 commits intopython:mainfrom
kumaraditya303:jit-dict-opt
Open

gh-143732: allow dict subclasses to be specialized #148128
kumaraditya303 wants to merge 5 commits intopython:mainfrom
kumaraditya303:jit-dict-opt

Conversation

@kumaraditya303
Copy link
Copy Markdown
Contributor

@kumaraditya303 kumaraditya303 commented Apr 5, 2026

This is revival of #132383 which allowed specialization for dict subclasses which do not override __getitem__. This PR also allows specialization for dict subclasses which do not override __setitem__.

This is primarily targeted for defaultdict which is the most performance critical subclass of dict.

@kumaraditya303 kumaraditya303 marked this pull request as ready for review April 5, 2026 18:39
@kumaraditya303 kumaraditya303 added the performance Performance or resource usage label Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant