-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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: Use *inline* caching for BINARY_OP
#31543
Conversation
@@ -24,6 +24,12 @@ interpreter. | |||
Use 2 bytes for each instruction. Previously the number of bytes varied | |||
by instruction. | |||
|
|||
.. versionchanged:: 3.11 |
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.
Maybe don't document this until we are sure it's what we want?
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'd prefer to keep it, and change it if/when dis
changes (which is easy enough). That way we don't forget to document it.
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.
OK. Once we've started doing this we will need to complete it before the beta release anyway.
Looks good in general. |
🤖 New build scheduled with the buildbot fleet by @brandtbucher for commit 1aa079c 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
👍 |
Here's a sort-of-rough first pass at implementing this idea.
BINARY_OP
is easy to start with, since it only uses its cache for the adaptivecounter
member. Initial perf testing doesn't show any impact, which I think is good (it means that the basic idea works well, even when the cache isn't being used).Related changes:
dis
utilities grow ashow_caches
parameter, defaulting toFalse
.wordcode_helpers.h
has been moved intocompile.c
.https://bugs.python.org/issue46841