Ticket #1 (closed defect: fixed)
fftw3 - poor performance for complex arrrays
| Reported by: | arnd.baecker@… | Owned by: | cookedm |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | scipy.fftpack | Version: | |
| Keywords: | fftw3 fft performance | Cc: |
Description
fft via scipy is much slower when using fftw3 instead of fftw2 (though fftw3 is typically much faster than fftw2, eg. using benchfft - http://www.fftw.org/benchfft/)
This was also reported before by Darren Dale. See http://www.physik.tu-dresden.de/~baecker/tmp/fftw/ a graphical illustration + scripts of the result.
This is what Pearu go on a Opteron box:
# Use fftw-2.1.3:
pearu@opt:~/svn/scipy/Lib/fftpack$ FFTW3=None python setup.py build
pearu@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@opt:~/svn/scipy/Lib/fftpack$ FFTW2=None python setup.py build
pearu@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
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
