bpo-37233: optimize case totalargs == 0 in method_vectorcall#14550
bpo-37233: optimize case totalargs == 0 in method_vectorcall#14550methane merged 1 commit intopython:masterfrom
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 == 0anyway. 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