[SciPy-Dev] default scipy fft performance
Fri Dec 21 10:26:07 CST 2012
Den 21. des. 2012 kl. 16:53 skrev David Cournapeau <firstname.lastname@example.org>:
> But you could use e.g. pyfftw that will give you a better wrapper that
> scipy ever had for FFTW.
> The difference in speed is not unexpected: the fft in numpy is there
> for historical reasons and backward compatibility. Unless you have a
> very good reason not to use it, you should be using scipy.fftpack
> instead of numpy.fft when you can depend on scipy.
Enthought is a good reason, as numpy.fft will use MKL.
Another good reason is that the wrapper for numpy.fft is written in a way that makes it easy to release the GIL (no global states in C land), whereas scipy.fftpack is not reentrant. Sometimes it can be nice to do multiple FFTs in parallel threads. (I might try to re-post a PR to NumPy for releasing the GIL in numpy.fft again, unless it is taken care of now, but last time nobody cared to review it.)
More information about the SciPy-Dev