def test(a, b):
cdef int x, y
for x, y in zip(a, b):
...
could be optimised using a Cython-implemented helper function template for zip() that calls next() separately on all iterators, converts the values to their specific target types (thus a template) and returns a ctuple instead of a Python tuple.
Probably just a bit of a wild idea, but this:
could be optimised using a Cython-implemented helper function template for zip() that calls next() separately on all iterators, converts the values to their specific target types (thus a template) and returns a ctuple instead of a Python tuple.
Migrated from http://trac.cython.org/ticket/871