This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author itamaro
Recipients itamaro
Date 2021-11-03.01:12:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635901961.22.0.404899300991.issue45697@roundup.psfhosted.org>
In-reply-to
Content
Based on real world profiling data we collected, a vast amount of `PyType_IsSubtype` calls are coming from `type_call`, when it decides whether `__init__` should run or not.

In the common case, the arguments to this call are identical, but the implementation still walks the MRO.

By returning early for identical types, the common case can be optimized with a non-trivial performance gain.
History
Date User Action Args
2021-11-03 01:12:41itamarosetrecipients: + itamaro
2021-11-03 01:12:41itamarosetmessageid: <1635901961.22.0.404899300991.issue45697@roundup.psfhosted.org>
2021-11-03 01:12:41itamarolinkissue45697 messages
2021-11-03 01:12:41itamarocreate