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 serhiy.storchaka
Recipients gvanrossum, methane, pitrou, scoder, serhiy.storchaka
Date 2018-01-11.19:25:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
The relative speed up looks nice. But it is just few microseconds per class. You have to create many thousands of classes to gain a significant fraction of second. And the complexity added by this patch is not tiny.

I'm not sure how this caching works when change the parent class after creating the child class.

Without caching the benefit is 20-50% smaller. Perhaps this result can be improved. Actually we don't need to search in all dictionaries of all classes in the MRO. We can check the correspondent slot in the parent class (the offsets are constants) and look up in the class dict of the first class with non-zero slot value.

I tried to simplify this change (even at the cost of smaller speedup). But the result still looks too complex.

Since the benefit in any case will be small, and seems there are no other issues that depend on this change, I suggest to defer it to 3.8. There are more priority changes that should be made before the feature freeze in 3.7.
History
Date User Action Args
2018-01-11 19:25:13serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, pitrou, scoder, methane
2018-01-11 19:25:13serhiy.storchakasetmessageid: <[email protected]>
2018-01-11 19:25:13serhiy.storchakalinkissue32346 messages
2018-01-11 19:25:13serhiy.storchakacreate