Łukasz Langa <luk...@langa.pl> added the comment:

Dennis, run your benchmarks with --rigorous to avoid "Benchmark hidden because 
not significant".

I note that the second and third benchmarks aren't useful as written because 
the iterators are exhausted after first repetition. I could see this in my 
results, note how the values don't rise with the iterator size:

for i in it_10: pass: Mean +- std dev: 25.0 ns +- 0.3 ns
for i in it_100: pass: Mean +- std dev: 25.1 ns +- 0.5 ns
for i in it_1000: pass: Mean +- std dev: 25.0 ns +- 0.3 ns
for i in it_10000: pass: Mean +- std dev: 25.0 ns +- 0.3 ns
for i in it_100000: pass: Mean +- std dev: 25.6 ns +- 0.5 ns

deque(it_10): Mean +- std dev: 334 ns +- 8 ns
deque(it_100): Mean +- std dev: 338 ns +- 9 ns
deque(it_1000): Mean +- std dev: 335 ns +- 9 ns
deque(it_10000): Mean +- std dev: 336 ns +- 10 ns
deque(it_100000): Mean +- std dev: 338 ns +- 11 ns

When I modified those to recreate the iterator on every run, the story was much 
different.

----------

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

Reply via email to