[Numpy-discussion] Numpy FFT.FFT slow with certain samples

Eric Firing efiring at hawaii.edu
Fri Aug 28 17:31:10 EDT 2015


On 2015/08/28 10:36 AM, Sebastian Berg wrote:
> If you don't mind the extra dependency or licensing and this is an issue
> for you, you can try pyfftw (there are likely other similar projects)
> which wraps fftw and does not have this problem as far as I know. It
> exposes a numpy-like interface.

Sort of; that interface returns a function, not the result.

fftw is still an fft algorithm, so it is still subject to a huge 
difference in run time depending on how the input array can be factored.

Furthermore, it gets its speed by figuring out how to optimize a 
calculation for a given size of input array.  That initial optimization 
can be very slow.  The overall speed gain is realized only when one 
saves the result of that optimization, and applies it to many 
calculations on arrays of the same size.

Eric

>
> - sebastian
>
>
> On Fr, 2015-08-28 at 19:13 +0000, Joseph Codadeen wrote:
>> Great, thanks Stefan and everyone.
>>
>>> From: stefanv at berkeley.edu
>>> To: numpy-discussion at scipy.org
>>> Date: Fri, 28 Aug 2015 12:03:52 -0700
>>> Subject: Re: [Numpy-discussion] Numpy FFT.FFT slow with certain
>> samples
>>>
>>>
>>> On 2015-08-28 11:51:47, Joseph Codadeen <jdmc80 at hotmail.com>
>>> wrote:
>>>> my_1_minute_noise_with_gaps_truncated - Array len is
>>>> 2646070my_1_minute_noise_with_gaps - Array len is 2649674
>>>
>>> In [6]: from sympy import factorint In [7]:
>>> max(factorint(2646070)) Out[7]: 367 In [8]:
>>> max(factorint(2649674)) Out[8]: 1324837
>>>
>>> Those numbers give you some indication of how long the FFT will
>>> take to compute.
>>>
>>> Stéfan
>>> _______________________________________________
>>> NumPy-Discussion mailing list
>>> NumPy-Discussion at scipy.org
>>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>
>> _______________________________________________
>> NumPy-Discussion mailing list
>> NumPy-Discussion at scipy.org
>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>




More information about the NumPy-Discussion mailing list