-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
bpo-37233: optimize case totalargs == 0 in method_vectorcall #14550
Conversation
I'm not sure this is really optimization. We need Would you show microbenchmark result for this? |
I checked and they don't optimize away this check. So my original reasoning is still correct: if this check has to be done anyway, we should put it as early as possible. |
Sorry, @jdemeyer and @methane, I could not cleanly backport this to |
If you want to backport this, you should also backport #13974 |
OK, I want to keep 3.8 and 3.9 same to ease future backporting. |
…onGH-14550) (cherry picked from commit 53c2143) Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
GH-14574 is a backport of this pull request to the 3.8 branch. |
Because of bpo-37138, we need to check the case
totalargs == 0
anyway. So it doesn't hurt to move that check earlier and add a fast path for the common case of calling a method without arguments.CC @methane
https://bugs.python.org/issue37233