-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
bpo-46841: Move the cache for LOAD_GLOBAL
inline.
#31575
bpo-46841: Move the cache for LOAD_GLOBAL
inline.
#31575
Conversation
🤖 New build scheduled with the buildbot fleet by @markshannon for commit 26d0d70 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Performance is underwhelming. What is notable is that the number of |
Yeah, I suspect we may not see a ton of payoff until we convert most/all of the caches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few things:
- The magic number needs to be bumped every time we do this.
- I thought we decided to use
_Py_CODEUNIT
everywhere you're usinguint16_t
now (it may also be worth adding_Py_TWOCODEUNITS
and_Py_FOURCODEUNITS
aliases foruint32_t
anduintptr_t
, respectively).
When you're done making the requested changes, leave the comment: |
👍
Hmm, I'd prefer not. Versions, for example, are 32 bit value, not 2 code units. If the size of the Maybe we should give up on the pretense that the size of the code unit can be easily changed, and replace |
# Python 3.11a5 3481 (Use inline CACHE instructions) | ||
# Python 3.11a5 3482 (Use inline caching for UNPACK_SEQUENCE) | ||
# Python 3.11a5 3481 (Use inline cache for BINARY_OP) | ||
# Python 3.11a5 3482 (Use inline caching for UNPACK_SEQUENCE and LOAD_GLOBAL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, looks like the magic number wasn't actually changed... bad merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured we didn't need more than one version number per day.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#31618 has another version number bump.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see what you did now. Thanks for clarifying.
Also removes duplication of the
_PyOpcode_InlineCacheEntries
table.https://bugs.python.org/issue46841