nested loops in Python

Chris Angelico rosuav at gmail.com
Thu Sep 8 08:11:06 EDT 2016


On Thu, Sep 8, 2016 at 8:20 PM, Igor Kozin <ink.icr at gmail.com> 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-loop-over-numpy-array
> Thanks!

Have you actually measured the loops and found them to be visibly slow?

ChrisA



More information about the Python-list mailing list