Message402708
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. |
|
Date |
User |
Action |
Args |
2021-09-27 13:25:07 | lukasz.langa | set | recipients:
+ lukasz.langa, gvanrossum, rhettinger, serhiy.storchaka, Dennis Sweeney |
2021-09-27 13:25:07 | lukasz.langa | set | messageid: <1632749107.18.0.727625155293.issue45026@roundup.psfhosted.org> |
2021-09-27 13:25:07 | lukasz.langa | link | issue45026 messages |
2021-09-27 13:25:06 | lukasz.langa | create | |
|