Skip to content

gh-150027: Avoid copying during construction of frozendict objects#153807

Open
ZeroIntensity wants to merge 2 commits into
python:mainfrom
ZeroIntensity:frozendict/optimize-construction
Open

gh-150027: Avoid copying during construction of frozendict objects#153807
ZeroIntensity wants to merge 2 commits into
python:mainfrom
ZeroIntensity:frozendict/optimize-construction

Conversation

@ZeroIntensity

@ZeroIntensity ZeroIntensity commented Jul 16, 2026

Copy link
Copy Markdown
Member

This applies the same optimization from #150028 to frozendict objects.

Comment thread Python/codegen.c
return 1;
}

if (_PyUnicode_EqualToASCIIString(func->v.Name.id, "frozendict")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, we have similar optimization with frozenset. So it looks good to me.

Sign up for free to 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