On Mon, Jun 28, 2010 at 10:04 AM, Jared Forsyth <[email protected]> wrote: > In the manual, it states that "for i in range(...)" gets automatically > converted to "for i from..." for performance benefits. > But it doesn't... I've tried > cdef int a=5 > for i in range(a):pass > and > for i in range(10):pass
If you don't type the 'i' in the above examples as some kind of integer, it will fallback to Python code. Try: cdef int a=5 cdef int i for i in range(a): pass > and neither are converted. Is the documentation wrong? [it seems like at > least the second one should be optimized] > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev > > _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
