Closed FlorianIragne closed 9 years ago
In short: this IS expected behavior.
FFTS has an on-the-fly compiler for Fourier transformations that is called in fft_init_1d. So every time you call the init procedure, the internal compiler generates the FFT procedure anew. FFTW3 has a different approach: it uses precompiled codelets and uses the ones that seem to fit best to your architecture and problem dimensions. It will also remember previous decisions as long as you use the same dimensions, so this is why the setup speed of FFTW3 may seem faster. If you really want to compare setup speeds, you should prevent FFTW3 from using previous knowledge.
In any case, pulling the setup out of the loop is the correct way, be it FFTS or FFTW3. And as you are saying, FFTS is slightly faster in that case.
Ok,
thanks for the exlanations
Hi,
i've a library that is able to use several FFTs (FFTS, FFTW3, my own one, OSX, etc). I've run a benchmark to check that FFTS was at least as fast as FFTW3, an found that FFTW3 is 9 times faster.
My benchmark was badly designed: i ran the fft compute in a for loop, but also init the fft at each loop.
Once corrected (i.e., fft init before the for loop), FFTS is a bit faster than FFTW3.
So, i guess that the fft_init_1d step is really slow compared to FFTW3 equivalent.
Is it a known issue, or is it expected behaviour?
thanks for your answer