[issue45697] PyType_IsSubtype is doing excessive work in the common case

Itamar Ostricher report at bugs.python.org
Tue Nov 2 23:43:04 EDT 2021


Itamar Ostricher <itamarost at gmail.com> added the comment:

Dennis, you mean something like this? https://github.com/itamaro/cpython/commit/92d46b260cf6ccce1a47003f539294530138e488

sure, that would preempt the `PyType_IsSubtype` calls coming from these specific callsites, but the early return in `PyType_IsSubtype` would cover those as well as any other path, wouldn't it?

----------

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


More information about the Python-bugs-list mailing list