Uh oh!
There was an error while loading. Please reload this page.
gh-119109: functool.partial vectorcall supports pto->kw & fallback to tp_call removed - #120783
gh-119109: functool.partial vectorcall supports pto->kw & fallback to tp_call removed#120783dg-pb wants to merge 2 commits into
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
vstinner
commented
Jun 24, 2024
Is the PR a draft or is it ready for review? |
dg-pb
commented
Jun 24, 2024
This one is a draft. Just an example of concept that works for current Reason being that #119827 will need a different implementation, which I have, but still waiting for reply how to go about it (#119827 (comment)): Here is implementation that works for It can be reviewed - sooner or later it will become PR. It is contained within one function - no documentation updates or anything additional is needed. Let me know if there is a good way to issue a separate PR on top of the one which is not yet merged - I am not aware of such. |
dg-pb
commented
Sep 26, 2024
Will issue a new PR for |
Although comment stated that "merging keyword arguments for vector call is messy" (not exact quote), but I have found that it is fairly straight forward.
This achieves 2 goals:
partialbeing stuck intp_callafter keywords are deleted even if function supportsvectorcall.len(pto-kw) != 0and function supportsvectorcall.Number 1. is solved better than it was in #119125 as there are no more switching between methods and faster
vectorcallis used whenever appropriate. Also, this does not require additional variable in class struct.Comparison of performance:
This is only initial attempt and I think the code can be made simpler. (much simpler if decide to use
_PyObject_VectorcallDictTstate).This will need to be adjusted to #119827 so do not merge.