Charles Brunet Charles Brunet - 10 months ago 101
Python Question

Improving FFT performance in Python

What is the fastest FFT implementation in Python?

It seems numpy.fft and scipy.fftpack both are based on fftpack, and not FFTW. Is fftpack as fast as FFTW? What about using multithreaded FFT, or using distributed (MPI) FFT?

Answer Source

You could certainly wrap whatever FFT implementation that you wanted to test using Cython or other like-minded tools that allow you to access external libraries. If you're going to test FFT implementations, you might also take a look at GPU-based codes (if you have access to the proper hardware). There are several:

There's also a CPU based python FFTW wrapper:

I don't have experience with any of these. It's probably going to fall to you to do some digging around and benchmark different codes for your particular application if speed is important to you.