New submission from Sergey Fedoseev:

> python -mtimeit -s "l = list(range(100000))" "l[-1] in l"
1000 loops, best of 3: 1.34 msec per loop
> python -mtimeit -s "l = list(range(100000))" "l[-1] in iter(l)"               
>                  
1000 loops, best of 3: 1.59 msec per loop

----------
messages: 299666
nosy: sir-sigurd
priority: normal
severity: normal
status: open
title: add __contains__ for list_iterator (and others) for better performance
type: performance

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31108>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to