Author pablogsal
Recipients BTaskaya, Guido.van.Rossum, Johan Dahlin, Mark.Shannon, barry, bismatrimony, corona10, gvanrossum, methane, nascheme, pablogsal, yselivanov
Date 2021-01-30.02:13:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1611972808.15.0.725226396625.issue42115@roundup.psfhosted.org>
In-reply-to
Content
> What am I missing? Why is the hash of the name needed?

To speed up the call to get the method from the dictionary using _PyDict_GetItem_KnownHash. The reason I was not caching the method is that as you mention there could still be an overriding value in the dictionary.

> But what if we only did this for classes without an instance dict? 

This is an interesting idea. For PR23503 seems that the machinery was too costly that it was killing the advantages, but maybe we could simplify this for classes without dictionaries so we can still gain overall.
History
Date User Action Args
2021-01-30 02:13:28pablogsalsetrecipients: + pablogsal, gvanrossum, barry, nascheme, methane, Mark.Shannon, yselivanov, Guido.van.Rossum, corona10, Johan Dahlin, BTaskaya, bismatrimony
2021-01-30 02:13:28pablogsalsetmessageid: <1611972808.15.0.725226396625.issue42115@roundup.psfhosted.org>
2021-01-30 02:13:28pablogsallinkissue42115 messages
2021-01-30 02:13:27pablogsalcreate