-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
gh-116381: Specialize CONTAINS_OP #116385
gh-116381: Specialize CONTAINS_OP #116385
Conversation
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.
LG (it's all just boilerplate :-) but I am curious about whether it makes any difference in perf. It doesn't strike me as all that common an operation, and I also don't think that we gain much here (just the dispatch via the type object, which for most of these ops isn't all that much compared to the actual work that the data type has to do to compute the result).
…ython into specialize_contains_op
@Fidget-Spinner Sadly I forgot to check for warnings. On macOS I now get the following warnings:
I suspect that the fix is to rename the args of those specialized ops to |
This consumes quite a few tier 1 bytecodes, which is quite a limited resource. We really shouldn't be merging performance PR without a solid justification. It doesn't have to be a clear improvement on pyperformance, but there must be some quantifiable improvement. |
It helps propagate more information to tier 2. |
Also you listed it in your TODO list. Unless you had in mind something with fewer specializations? |
Yes, I did. faster-cpython/ideas#660. |
* Specialize CONTAINS_OP * 📜🤖 Added by blurb_it. * Add PyAPI_FUNC for JIT --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* Specialize CONTAINS_OP * 📜🤖 Added by blurb_it. * Add PyAPI_FUNC for JIT --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Closes #116381
CONTAINS_OP
#116381