◐ Shell
clean mode source ↗

gh-109653: Improve `enum` import time by avoiding import of `functools` by AlexWaygood · Pull Request #109789 · python/cpython

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@AlexWaygood

@AlexWaygood AlexWaygood commented

Sep 23, 2023

edited by bedevere-app Bot

Loading

Copy link Copy Markdown

Member

This reduces the import time of enum by over 50% on my machine (PGO-optimised, non-debug build on Windows), from around 0.007s to around 0.003s

@AlexWaygood AlexWaygood added performance

Performance or resource usage

3.13

bugs and security fixes

type-feature

A feature request or enhancement

stdlib

Standard Library Python modules in the Lib/ directory

labels

Sep 23, 2023

@ethanfurman ethanfurman merged commit 51863b7 into python:main

Sep 23, 2023

@AlexWaygood AlexWaygood deleted the enum-import-time branch

September 23, 2023 18:32

csm10495 pushed a commit to csm10495/cpython that referenced this pull request

Sep 28, 2023

Glyphack pushed a commit to Glyphack/cpython that referenced this pull request

Sep 2, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@JelleZijlstra JelleZijlstra JelleZijlstra approved these changes

@ethanfurman ethanfurman ethanfurman approved these changes

Assignees

No one assigned

Labels

3.13

bugs and security fixes

performance

Performance or resource usage

stdlib

Standard Library Python modules in the Lib/ directory

type-feature

A feature request or enhancement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@AlexWaygood @JelleZijlstra @ethanfurman