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: Remove JIT guards fordict
,frozenset
,list
,set
, andtuple
#132289
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
@Zheaoli and@tomasr8, you might be interested in checking this out. Specifically, see the changes in You can see that this PR breaks up the old, larger |
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.
Just one concern.
Uh oh!
There was an error while loading.Please reload this page.
@@ -396,7 +396,6 @@ dummy_func(void) { | |||
op(_TO_BOOL_LIST, (value -- res)) { | |||
int already_bool = optimize_to_bool(this_instr, ctx, value, &res); | |||
if (!already_bool) { | |||
sym_set_type(value, &PyList_Type); |
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.
Does CONTAIN_OP_SET and CONTAIN_OP_DICT need to remove their sym setting type as well? Or is that not even happening at the moment?
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.
Not happening currently,._CONTAINS_OP_SET
can't even set anything, since it handles bothset
andfrozenset
(this might be worth re-evaluating, or splitting up).
Thanks! I think I might need some time to understand this PR! Thanks for your patience! |
Going to go ahead and merge this to reduce the risk of merge conflicts, but let me know if you have any questions@Zheaoli! |
20926c7
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.
According to thestats, this removes:
tuple
guards (25%)set
/frozenset
guards (19%)dict
guards (42%)list
guards (34%)It also fixes a bug that I encountered in the optimizer's logic for
_UNPACK_SEQUENCE_TUPLE
, which puts items on the stack inreverse order.