Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
GH-131798: Allow the JIT to remove moreint
/float
/str
guards#131800
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
One nice unintended effect of this: |
Looks about0.5% faster. According to the stats, this avoids:
|
1a9d4a1
intopython:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This changes the definitions of
BINARY_OP_SUBSCR_LIST_INT
,BINARY_OP_SUBSCR_STR_INT
,BINARY_OP_SUBSCR_TUPLE_INT
, andSTORE_SUBSCR_LIST_INT
to use our existingint
/str
guards for their operands (I'll add new guards for the containers themselves in a follow-up PR). This way, they can be removed when possible.As part of this change, get rid of the
_GUARD_BOTH_FLOAT
,_GUARD_BOTH_INT
, and_GUARD_BOTH_UNICODE
micro-ops, since they just make the abstract interpreter more complicated for not much benefit.