Message385966
> 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. |
|
Date |
User |
Action |
Args |
2021-01-30 02:13:28 | pablogsal | set | recipients:
+ pablogsal, gvanrossum, barry, nascheme, methane, Mark.Shannon, yselivanov, Guido.van.Rossum, corona10, Johan Dahlin, BTaskaya, bismatrimony |
2021-01-30 02:13:28 | pablogsal | set | messageid: <1611972808.15.0.725226396625.issue42115@roundup.psfhosted.org> |
2021-01-30 02:13:28 | pablogsal | link | issue42115 messages |
2021-01-30 02:13:27 | pablogsal | create | |
|