Skip to content

gh-141510: Optimize frozendict(frozendict) - #145592

Merged
vstinner merged 5 commits into
python:mainfrom
vstinner:frozendict_new_same
Mar 9, 2026
Merged

gh-141510: Optimize frozendict(frozendict)#145592
vstinner merged 5 commits into
python:mainfrom
vstinner:frozendict_new_same

Conversation

@vstinner

@vstinnervstinner commented Mar 6, 2026

Copy link
Copy Markdown
Member

Return the same object unmodified if it's exactly the frozendict type.

Return the same object unmodified if it's exactly the frozendict
type.
@vstinner

Copy link
Copy Markdown
MemberAuthor

cc @encukou

Comment threadObjects/dictobject.c
@vstinner
vstinner merged commit 0dfe649 into python:mainMar 9, 2026
52 checks passed
@vstinner
vstinner deleted the frozendict_new_same branch March 9, 2026 14:47
@vstinner

Copy link
Copy Markdown
MemberAuthor

Merged. Thanks for reviews.

ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
Return the same object unmodified if it's exactly the frozendict
type.
Optimize also PyFrozenDict_New(frozendict).
Sign up for freeto 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.

3 participants

@vstinner@encukou@kumaraditya303