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

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.

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 90 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants