This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lukasz.langa
Recipients Dennis Sweeney, gvanrossum, lukasz.langa, rhettinger, serhiy.storchaka
Date 2021-09-27.13:25:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1632749107.18.0.727625155293.issue45026@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-09-27 13:25:07lukasz.langasetrecipients: + lukasz.langa, gvanrossum, rhettinger, serhiy.storchaka, Dennis Sweeney
2021-09-27 13:25:07lukasz.langasetmessageid: <1632749107.18.0.727625155293.issue45026@roundup.psfhosted.org>
2021-09-27 13:25:07lukasz.langalinkissue45026 messages
2021-09-27 13:25:06lukasz.langacreate