[issue31108] add __contains__ for list_iterator (and others) for better performance

Serhiy Storchaka report at bugs.python.org
Thu Aug 3 02:32:08 EDT 2017


Serhiy Storchaka added the comment:

The patch adds almost 40 line of the code and increases the performance of not well famous feature at best by 10-20%. Adding an optimization for every new iterator type will add a comparable quantity of the code. I think this is too high cost.

Using a common template implementation for iterators (issue27438) would decrease the relative cost of this feature.

----------
components: +Interpreter Core
nosy: +rhettinger, serhiy.storchaka
stage:  -> patch review
versions: +Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31108>
_______________________________________


More information about the Python-bugs-list mailing list