Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize performance of copy.deepcopy by adding a fast path for atomic types #114264

Closed
eendebakpt opened this issue Jan 18, 2024 · 0 comments
Closed
Labels
performance Performance or resource usage stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@eendebakpt
Copy link
Contributor

eendebakpt commented Jan 18, 2024

Feature or enhancement

Proposal:

The performance of copy.deepcopy can be improved by adding a fast path for the atomic types. This will reduce the overhead of checking the memo and the overhead of calling the dispatch method from the deepcopy dispatch table.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

@eendebakpt eendebakpt added the type-feature A feature request or enhancement label Jan 18, 2024
@erlend-aasland erlend-aasland added performance Performance or resource usage stdlib Python modules in the Lib dir labels Jan 18, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
estyxx pushed a commit to estyxx/cpython that referenced this issue Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance or resource usage stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants