Dennis Sweeney <[email protected]> added the comment:
# benchmarking script
from pyperf import Runner
runner = Runner()
for n in [2, 10, 100, 10_000]:
for A in [
'[None]',
'["Python", "Perl"]',
'list(range(10))',
'list(range(100))',
'list(range(1000))',
'(None,)',
'("Python", "Perl")',
'tuple(range(10))',
'tuple(range(100))',
'tuple(range(1000))',
]:
runner.timeit(
name=f"{A} * {n}",
setup=f"x = {A}",
stmt=f"x * {n}",
)
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46235>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com