You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, inlining this Cython-side could mean very much to performance. So the proposal is: If the iterator in a for-loop calls a cdef function, inspect whether there is a) only one possible return value outside of any branches, and b) if it is a Cython "magic loop function". If so, inline it in Cython.
(There's always the danger of this being too magic shrug)
Ah, good idea. Alternatively a decorator, @cython.returnsmagiciterator or similar. I forgot that magicness can always be removed by adding explicit declarations :-) (complexity cannot though)
Filing this as it's an idea and I "need" it, but it is far out and really low priority.
Consider this snippet:
Now, inlining this Cython-side could mean very much to performance. So the proposal is: If the iterator in a for-loop calls a cdef function, inspect whether there is a) only one possible return value outside of any branches, and b) if it is a Cython "magic loop function". If so, inline it in Cython.
(There's always the danger of this being too magic shrug)
Migrated from http://trac.cython.org/ticket/182
The text was updated successfully, but these errors were encountered: