2011/5/23 Stefan Behnel <[email protected]>:
>
> However, once we really know which values change between yield calls, i.e.
> which ones need to be stored away, it will actually be less expensive in
> most cases. We currently pay the indirection penalty for each access, even
> read access, whereas the C compiler can then keep important variables in
> registers and only write them back once per yield.
>

I think that all not NULL variables should be saved/restored inside yield.
I can not really track changes only assignments.

for i in a:
    yield i  # j is NULL here
for j in b:
    yield j # a, b, i ,j should be saved/restored

-- 
vitja.
_______________________________________________
cython-devel mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to