Commit 69cbec4a authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

tests/bench: Add testcase for positional/kwargs to enumerate().

Inspired by discussion in #577. So, in this case of builtin function,
passing args by keyword has less than 1% overhead.
parent 2a05f05f
import bench
def test(num):
for i in iter(range(num//20)):
enumerate([1, 2], 1)
bench.run(test)
import bench
def test(num):
for i in iter(range(num//20)):
enumerate(iterable=[1, 2], start=1)
bench.run(test)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment