Commit 26032d37 authored by Stefan Behnel's avatar Stefan Behnel

another benchmark tweak

parent 4f65182c
...@@ -10,6 +10,7 @@ def count_to(N): ...@@ -10,6 +10,7 @@ def count_to(N):
for i in range(N): for i in range(N):
yield i yield i
@cython.locals(i=cython.Py_ssize_t)
def round_robin(*_iterators): def round_robin(*_iterators):
iterators = list(_iterators) iterators = list(_iterators)
to_drop = [] to_drop = []
...@@ -22,8 +23,8 @@ def round_robin(*_iterators): ...@@ -22,8 +23,8 @@ def round_robin(*_iterators):
else: else:
yield value yield value
if to_drop: if to_drop:
for index in reversed(to_drop): for i in reversed(to_drop):
del iterators[index] del iterators[i]
del to_drop[:] del to_drop[:]
def yield_from(*iterators): def yield_from(*iterators):
......
Markdown is supported
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