Ammar Askar <am...@ammaraskar.com> added the comment:
I've attached a PR that implements this. From the looks of it, there aren't a lot of uses of subclass_of within argument clinic converted functions at the moment. Additionally, most of the places it is used tend to have some non object arguments so a call to _PyArg_ParseStack() gets placed anyway. Attached as part of separate commit in the PR is the conversion of some files over to use the new code. These are mostly just to serve as examples. While converting would still leave a call to ParseStack in most places, I'd like to do some benchmarking and figure out if there is still a benefit. Like you said, the fact that branch-prediction is easier might be useful given that these functions are usually called with the right types of arguments anyway. ---------- nosy: +ammar2 stage: patch review -> _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34838> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com