__delitem__ affecting performance
Fredrik Lundh
fredrik at pythonware.com
Thu Oct 19 05:20:50 EDT 2006
Karl H. wrote:
> Does anybody know why defining __delitem__ is causing the code to run
> slower? It is not being called, so I don't see why it would affect
> performance.
probably because overriding portions of the internal sequence slot API
(tp_as_sequence) means that Python needs to do full dispatch for all
members of that API, instead of keeping things at the C level.
</F>
More information about the Python-list
mailing list