{{ message }}
GH-100288: Skip extra work when failing to specialize LOAD_ATTR#101354
Merged
brandtbucher merged 2 commits intopython:mainfrom Jan 31, 2023
Merged
GH-100288: Skip extra work when failing to specialize LOAD_ATTR#101354brandtbucher merged 2 commits intopython:mainfrom
LOAD_ATTR#101354brandtbucher merged 2 commits intopython:mainfrom
Conversation
2 tasks
markshannon
reviewed
Jan 27, 2023
Member
markshannon
left a comment
There was a problem hiding this comment.
Thanks. Could you also move the body of the if statement into the switch case.
Member
There was a problem hiding this comment.
Since there is only the one case now, it would make the code easier to follow if this were moved into the case MANAGED_VALUES: below.
Member
Author
|
Can I just get rid of the |
Member
Sounds good to me. We can then get rid of |
Member
|
Looks good. |
markshannon
approved these changes
Jan 31, 2023
Member
Author
carljm
added a commit
to carljm/cpython
that referenced
this pull request
Jan 31, 2023
* main: pythonGH-100288: Skip extra work when failing to specialize LOAD_ATTR (pythonGH-101354) pythongh-101409: Improve generated clinic code for self type checks (python#101411) pythongh-98831: rewrite BEFORE_ASYNC_WITH and END_ASYNC_FOR in the instruction definition DSL (python#101458) pythongh-101469: Optimise get_io_state() by using _PyModule_GetState() (pythonGH-101470)
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.

I think this was missed in #100753.
This removes a dict lookup, a dict version, and a cache write from one case where we fail to specialize method loads (due to the existence of a non-managed instance
__dict__).