Repository navigation
gh-93910: Fix enum performance regression - #94614
Merged
Merged
Conversation
This removes the performance regression in 3.11, at the expense of not fixing the "bug" that allows accessing values from values (e.g. `Color.RED.BLUE`).
tiran
reviewed
Jul 6, 2022
tiran
left a comment
Member
There was a problem hiding this comment.
Awesome, excellent work!
I skimmed the docs and could not find a whatsnew or versionchanged entry that mentions the new and now removed behavior.
Co-authored-by: Christian Heimes <christian@python.org>
Member
|
Could you please add blurb that mentions the performance regression and the fact that member of member access is permitted again? |
brettcannon
reviewed
Jul 6, 2022
brettcannon
left a comment
Member
There was a problem hiding this comment.
Minor comment formatting change to make, otherwise LGTM.
Co-authored-by: Brett Cannon <brett@python.org>
tiran
approved these changes
Jul 6, 2022
tiran
left a comment
Member
There was a problem hiding this comment.
LGTM, thank you for fixing this release blocker!
Member
|
@ethanfurman Are you ok with the change for 3.11? |
pablogsal
approved these changes
Jul 7, 2022
Contributor
|
Thanks @mdboom for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jul 7, 2022
This removes the performance regression in 3.11, **at the expense of not fixing the "bug" that allows accessing values from values** (e.g. `Color.RED.BLUE`). Using the benchmark @markshannon [presented](https://github.com/python/cpython/issues/93910GH-issuecomment-1165503032), the results are: | Version | Enum | Fast enum | Normal class | | --- | --- | --- | --- | | 3.10 | 2.04 | 0.59 | 0.56 | | 3.11 | 2.78 | 0.31 | 0.15 | | This PR | 1.30 | 0.32 | 0.16 | I share this mostly as information about the source of the regression, as this may be useful. It may be that the lower-risk approach for the beta is just to revert to a previously-known working state. (cherry picked from commit ed136b9) Co-authored-by: Michael Droettboom <mdboom@gmail.com>
|
GH-94655 is a backport of this pull request to the 3.11 branch. |
miss-islington
added a commit
that referenced
this pull request
Jul 7, 2022
This removes the performance regression in 3.11, **at the expense of not fixing the "bug" that allows accessing values from values** (e.g. `Color.RED.BLUE`). Using the benchmark @markshannon [presented](https://github.com/python/cpython/issues/93910GH-issuecomment-1165503032), the results are: | Version | Enum | Fast enum | Normal class | | --- | --- | --- | --- | | 3.10 | 2.04 | 0.59 | 0.56 | | 3.11 | 2.78 | 0.31 | 0.15 | | This PR | 1.30 | 0.32 | 0.16 | I share this mostly as information about the source of the regression, as this may be useful. It may be that the lower-risk approach for the beta is just to revert to a previously-known working state. (cherry picked from commit ed136b9) Co-authored-by: Michael Droettboom <mdboom@gmail.com>
This was referenced Jul 8, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This removes the performance regression in 3.11, at the expense of not fixing
the "bug" that allows accessing values from values (e.g.
Color.RED.BLUE).Using the benchmark @markshannon presented, the results are:
I share this mostly as information about the source of the regression, as this may be useful. It may be that the lower-risk approach for the beta is just to revert to a previously-known working state.
Automerge-Triggered-By: GH:tiran