Re: nested loops in Python

2016-09-09 Thread Igor Kozin
I think you are right, it's the assignment itself which is slow. Merged loop is only a tad quicker. On Thursday, September 8, 2016 at 6:04:41 PM UTC+1, Christian Gollwitzer wrote: > > Why nested loops are so slow in Python? Is it because new contexts are > > created? > > For more details, see > >

Re: nested loops in Python

2016-09-08 Thread Christian Gollwitzer
Am 08.09.16 um 12:20 schrieb Igor Kozin: Why nested loops are so slow in Python? Is it because new contexts are created? For more details, see http://stackoverflow.com/questions/26611043/numpy-vs-cython-nested-loop-so-slow http://stackoverflow.com/questions/39371021/efficient-loop-over-numpy-arra

Re: nested loops in Python

2016-09-08 Thread Chris Angelico
On Thu, Sep 8, 2016 at 8:20 PM, Igor Kozin wrote: > Why nested loops are so slow in Python? Is it because new contexts are > created? > For more details, see > http://stackoverflow.com/questions/26611043/numpy-vs-cython-nested-loop-so-slow > http://stackoverflow.com/questions/39371021/efficient-l