-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
Experimental variant of BINARY_ADD specialization. #29059
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
Experimental variant of BINARY_ADD specialization. #29059
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.
I wonder if we'll see any speedups from this. I don't see how it will be much faster than PyNumber_Add
. If the compiler's smart about it, it'll probably inline PyNumber_Add
during PGO, and we'll have almost the same function
Py_DECREF(sum); | ||
sum = NULL; |
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.
You may want to consider replacing this with
Py_DECREF(sum); | |
sum = NULL; | |
Py_SETREF(sum, NULL); |
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.
Or:
Py_DECREF(sum); | |
sum = NULL; | |
Py_CLEAR(sum); |
Will need reworking once #29482 is merged. |
@brandtbucher Maybe something like this will show better results now that the binary and inplace operators have been merged? |
No description provided.