Re: [Cython] Generators & closure optimization

2011-12-27 Thread Vitja Makarov
2011/12/27 Stefan Behnel : > Vitja Makarov, 26.12.2011 20:07: >> >> 2011/12/25 Stefan Behnel: >> >>> Stefan Behnel, 21.12.2011 21:17: Vitja Makarov, 21.12.2011 19:48: > > > Some time ago we were talking about generators optimization by copying > local variables from closur

Re: [Cython] Generators & closure optimization

2011-12-26 Thread Stefan Behnel
Vitja Makarov, 26.12.2011 20:07: 2011/12/25 Stefan Behnel: Stefan Behnel, 21.12.2011 21:17: Vitja Makarov, 21.12.2011 19:48: Some time ago we were talking about generators optimization by copying local variables from closure into local scope. Yes, I think that will make it easier for the C

Re: [Cython] Generators & closure optimization

2011-12-26 Thread Vitja Makarov
2011/12/25 Stefan Behnel : > Stefan Behnel, 21.12.2011 21:17: > >> Vitja Makarov, 21.12.2011 19:48: >>> >>> Some time ago we were talking about generators optimization by copying >>> local variables from closure into local scope. >> >> >> Yes, I think that will make it easier for the C compiler to

Re: [Cython] Generators & closure optimization

2011-12-25 Thread Stefan Behnel
Stefan Behnel, 21.12.2011 21:17: Vitja Makarov, 21.12.2011 19:48: Some time ago we were talking about generators optimization by copying local variables from closure into local scope. Yes, I think that will make it easier for the C compiler to make optimistic assumptions about external values.

Re: [Cython] Generators & closure optimization

2011-12-21 Thread Stefan Behnel
Vitja Makarov, 21.12.2011 19:48: Some time ago we were talking about generators optimization by copying local variables from closure into local scope. Yes, I think that will make it easier for the C compiler to make optimistic assumptions about external values. Now I think that should be a

[Cython] Generators & closure optimization

2011-12-21 Thread Vitja Makarov
Some time ago we were talking about generators optimization by copying local variables from closure into local scope. Now I think that should be a good idea to implement this for both generators and regular closure functions. So local var will be used for reference and assignment should be made to