strange numpy fft performance

前端 未结 3 2202
悲哀的现实
悲哀的现实 2021-01-04 18:27

During testing I have noticed something strange.

I’m FFT’ing a lot of vectors, and from time to time the numpy FFT function seemed to crash.

I briefly debu

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-04 19:11

    Divide-and-conquer FFT algorithms, such as Cooley-Tukey, work much better the more factors the input length has. Powers of 2 work especially well, whereas primes (like 165037) require alternate, slower implementations. If you can pad your input to a power-of-2 length, you may be able to drastically speed up slow FFTs.

提交回复
热议问题