Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-116381: Specialize CONTAINS_OP#116385
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
Fidget-Spinner commented Mar 5, 2024 • edited by bedevere-app bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-app bot
Uh oh!
There was an error while loading. Please reload this page.
gvanrossum left a comment
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
gvanrossum commented Mar 6, 2024
@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 |
markshannon commented Mar 7, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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. |
Fidget-Spinner commented Mar 7, 2024
It helps propagate more information to tier 2. |
Fidget-Spinner commented Mar 7, 2024
Also you listed it in your TODO list. Unless you had in mind something with fewer specializations? |
markshannon commented Mar 7, 2024
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