Pablo Galindo Salgado <[email protected]> added the comment:
More benchmarks for slow iterators:
import perf
runner = perf.Runner()
runner.timeit("list_comp",
stmt="[x**2 for x in k]",
setup="k=iter(list(range(10)))")
Current master:
❯ ./python.exe ../check.py
.....................
list_comp: Mean +- std dev: 924 ns +- 35 ns
PR 12718:
❯ ./python.exe ../check.py
.....................
list_comp: Mean +- std dev: 1.17 us +- 0.06 us
----------
nosy: +pablogsal
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36551>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com