[SciPy-user] scipy.fftpack performance (was Re: scipy.basic to numpy)

Pearu Peterson pearu at scipy.org
Fri Jan 6 01:34:24 CST 2006


This is what I get on a Opteron box:

# Use fftw-2.1.3:
pearu at opt:~/svn/scipy/Lib/fftpack$ FFTW3=None python setup.py build
pearu at opt:~/svn/scipy/Lib/fftpack$ python tests/test_basic.py -l 10
   Found 23 tests for __main__

                  Fast Fourier Transform
=================================================
       |    real input     |   complex input
-------------------------------------------------
  size |  scipy  | Numeric |  scipy  | Numeric
-------------------------------------------------
   100 |    0.07 |    0.07 |    0.07 |    0.08  (secs for 7000 calls)
  1000 |    0.07 |    0.11 |    0.09 |    0.11  (secs for 2000 calls)
   256 |    0.13 |    0.16 |    0.15 |    0.15  (secs for 10000 calls)
   512 |    0.19 |    0.28 |    0.22 |    0.29  (secs for 10000 calls)
  1024 |    0.03 |    0.06 |    0.04 |    0.06  (secs for 1000 calls)
  2048 |    0.06 |    0.10 |    0.09 |    0.10  (secs for 1000 calls)
  4096 |    0.06 |    0.15 |    0.09 |    0.16  (secs for 500 calls)
  8192 |    0.15 |    0.68 |    0.37 |    0.70  (secs for 500 calls)
...
----------------------------------------------------------------------
Ran 23 tests in 26.286s

# Use fftw-3.0.1:
pearu at opt:~/svn/scipy/Lib/fftpack$ FFTW2=None python setup.py build
pearu at opt:~/svn/scipy/Lib/fftpack$ python tests/test_basic.py -l 10
   Found 23 tests for __main__

                  Fast Fourier Transform
=================================================
       |    real input     |   complex input
-------------------------------------------------
  size |  scipy  | Numeric |  scipy  | Numeric
-------------------------------------------------
   100 |    0.07 |    0.08 |    0.43 |    0.09  (secs for 7000 calls)
  1000 |    0.07 |    0.12 |    0.61 |    0.12  (secs for 2000 calls)
   256 |    0.15 |    0.16 |    0.99 |    0.16  (secs for 10000 calls)
   512 |    0.22 |    0.29 |    1.53 |    0.29  (secs for 10000 calls)
  1024 |    0.04 |    0.06 |    0.26 |    0.06  (secs for 1000 calls)
  2048 |    0.06 |    0.10 |    0.48 |    0.10  (secs for 1000 calls)
  4096 |    0.06 |    0.15 |    0.48 |    0.16  (secs for 500 calls)
  8192 |    0.15 |    0.68 |    1.11 |    0.69  (secs for 500 calls)
....
----------------------------------------------------------------------
Ran 23 tests in 38.188s


On Fri, 6 Jan 2006, Arnd Baecker wrote:

> Hi Pearu,
>
> Do you also observe a very poor performance of fftw-3.0.1 for
> (in particular for complex Arrays)?

So, yes. I get similar behavior on a 32-bit box. So, it's probably not a 
64-bit issue.

A reason for using fftw3 is slower than when using fftw2 could be due to 
the fact that fftw2 wrappers use cache while fftw3 wrappers don't, if I 
recall correctly. I'll look into later.. Could you create a ticket in

   http://projects.scipy.org/scipy/scipy/wiki

about this issue?

Pearu



More information about the SciPy-user mailing list