should `cdef int i` here to get loop optimization.