Which direction should go faster than np.fft

I have code strongly using np.fft.rfft and np.fft.irfft , so this is a bottleneck for optimization.

Is there a chance to go faster than this, and if so, what are my best options. The thoughts that happen to me will be as follows:

  • Kithon - heard it very quickly; but will it help here?
  • recoding to numpy - rfft calls _raw_fft , which does a lot of checking, then calls fftpack.cfftf . The profiler tells me that only 80% of the time is in fftpack.cfftf , removing the wrapper to the only bits I need can save some time.
  • find a faster DFT algorithm somewhere?
  • buy more computers

So the question really comes down to the following:

  • Does anyone with Cython experience know if it's worth a try - or he can't do numpy faster.
  • Are there any faster packages? How much faster is it possible?
+4
source share
1 answer

I found this question / answer that actually answers part of this:

fooobar.com/questions/129451 / ...

It shows that there is another FFT implementation in scipy, which is pretty fast, but there is also a package called FFTW that runs faster (up to 3 times, looking at these tests).

So this just leaves the question of whether Cython will do it faster.

+5
source

Source: https://habr.com/ru/post/1499827/


All Articles