Message399922
Since probably Monica are taking her holidays, I try to decipher her answer.
Probably, the more problematic function spotted by Monica is update_one_slot. I re-quote her sentence:
update_one_slot looks for the parent implementation by trying to find the generated wrapper methods through an MRO search.
dict doesn't have generated wrappers for sq_contains and mp_subscript, because it provides explicit __contains__ and __getitem__ implementations.
Instead of inheriting sq_contains and mp_subscript, update_one_slot ends up giving the subclass sq_contains and mp_subscript implementations that perform an MRO search for __contains__ and __getitem__ and call those. This is much less efficient than inheriting the C slots directly.
The solution for Monica is to change the behaviour of update_one_slot for these cases (no wrappers, C slots directly).
I don't know the implications of this change... |
|
Date |
User |
Action |
Args |
2021-08-19 16:21:29 | Marco Sulla | set | recipients:
+ Marco Sulla, gvanrossum, willingc, Kevin Shweh, jack__d |
2021-08-19 16:21:29 | Marco Sulla | set | messageid: <1629390089.88.0.65824233314.issue44921@roundup.psfhosted.org> |
2021-08-19 16:21:29 | Marco Sulla | link | issue44921 messages |
2021-08-19 16:21:29 | Marco Sulla | create | |
|