[issue46533] Specialize for staticmethods and classmethods

Ken Jin report at bugs.python.org
Wed Jan 26 05:40:22 EST 2022


Ken Jin <kenjin4096 at gmail.com> added the comment:

Slightly off topic rambling:

My own toy attempts at classmethod specialization suggested that it barely sped anything up. Most of the time went to creation of the new classmethod object. I'd imagine supporting Py_TPFLAGS_METHOD_DESCRIPTOR would speed things up, but they cover such a small % of calls that Py_TPFLAGS_METHOD_DESCRIPTOR's complexity might not be worth it.

Increasing specialization percentage is always a plus though. LOAD_METHOD needs better specialization success rates.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46533>
_______________________________________


More information about the Python-bugs-list mailing list