[SciPy-user] Re: vectorize(function)/arraymap did not return arrays?

Vladimir Roudnev vroudnev at ksu.edu
Tue Feb 1 11:47:04 CST 2005

> So I have to loop through all the rows and columns on this grid, at 
> this point I found the nested looping is kind of slow to my 
> expectation, and the inner function call to the convolution function, 
> since it's using scipy's fftpack or Numeric, I do not think the inner 
> function call could be speeded a lot more by written C code in weave.

If you are so sure that it is the python nested loops construcion that 
cause the performance degradation, why would not you just unroll the 
inner loop manually and compare the performance? I'm too far from being 
familiar with how the execution environment is organized, but I am 
really surprised that such simple construction as nested loops can cause 
a performance degradation... It sounds counterintuitive for me...

More information about the SciPy-user mailing list