Re: [Numpy-discussion] Fast sizes for FFT

2014-12-24 Thread RayS
At 06:47 PM 12/23/2014, you wrote: The performance of fftpack depends very strongly on the array size -- sizes that are powers of two are good, but also powers of three, five and seven, or numbers whose only prime factors are from (2,3,5,7). For problems that can use padding, rounding up the si

Re: [Numpy-discussion] Fast sizes for FFT

2014-12-24 Thread Luke Pfister
On Wed, Dec 24, 2014 at 7:56 AM, Sturla Molden wrote: > On 24/12/14 14:34, Sturla Molden wrote: > > I would rather have SciPy implement this with the overlap-and-add method > > rather than padding the FFT. Overlap-and-add is more memory efficient > > for large n: > > (eh, the list should be) > >

Re: [Numpy-discussion] Fast sizes for FFT

2014-12-24 Thread Sturla Molden
On 24/12/14 14:34, Sturla Molden wrote: > I would rather have SciPy implement this with the overlap-and-add method > rather than padding the FFT. Overlap-and-add is more memory efficient > for large n: (eh, the list should be) - Overlap-and-add is more memory efficient for large n. - It scales

Re: [Numpy-discussion] Fast sizes for FFT

2014-12-24 Thread Sturla Molden
On 24/12/14 04:33, Robert McGibbon wrote: > Alex Griffing pointed out on github that this feature was recently added > to scipy in https://github.com/scipy/scipy/pull/3144. Sweet! I would rather have SciPy implement this with the overlap-and-add method rather than padding the FFT. Overlap-and-ad

Re: [Numpy-discussion] Fast sizes for FFT

2014-12-24 Thread Sturla Molden
On 24/12/14 13:23, Julian Taylor wrote: > hm this is a brute force search, probably fast enough but slower than > scipy's code (if it also were cython) That was what I tought as well when I wrote it. But it turned out that regular numbers are so close and abundant that was damn fast, even in Py

Re: [Numpy-discussion] Fast sizes for FFT

2014-12-24 Thread Julian Taylor
On 24.12.2014 13:07, Sturla Molden wrote: > On 24/12/14 04:33, Robert McGibbon wrote: >> Alex Griffing pointed out on github that this feature was recently added >> to scipy in https://github.com/scipy/scipy/pull/3144. Sweet! > > > I use different padsize search than the one in SciPy. It would be

Re: [Numpy-discussion] Fast sizes for FFT

2014-12-24 Thread Sturla Molden
On 24/12/14 13:07, Sturla Molden wrote: > v > > cdef intp_t checksize(intp_t n): > while not (n % 5): n /= 5 > while not (n % 3): n /= 3 > while not (n % 2): n /= 2 > return (1 if n == 1 else 0) > > def _next_regular(target): > cdef intp_t n = target > while not

Re: [Numpy-discussion] Fast sizes for FFT

2014-12-24 Thread Sturla Molden
On 24/12/14 04:33, Robert McGibbon wrote: > Alex Griffing pointed out on github that this feature was recently added > to scipy in https://github.com/scipy/scipy/pull/3144. Sweet! I use different padsize search than the one in SciPy. It would be interesting to see which is faster. from numpy c

Re: [Numpy-discussion] Fast sizes for FFT

2014-12-24 Thread Julian Taylor
I still have the plan to add this function as public api to numpy's fft helper functions, though I didn't get to it yet. Its a relative simple task if someone wants to contribute. On 24.12.2014 04:33, Robert McGibbon wrote: > Alex Griffing pointed out on github that this feature was recently added

Re: [Numpy-discussion] Fast sizes for FFT

2014-12-23 Thread Robert McGibbon
Alex Griffing pointed out on github that this feature was recently added to scipy in https://github.com/scipy/scipy/pull/3144. Sweet! -Robert On Tue, Dec 23, 2014 at 6:47 PM, Charles R Harris wrote: > > > On Tue, Dec 23, 2014 at 7:32 PM, Robert McGibbon > wrote: > >> Hey, >> >> The performance

Re: [Numpy-discussion] Fast sizes for FFT

2014-12-23 Thread Charles R Harris
On Tue, Dec 23, 2014 at 7:32 PM, Robert McGibbon wrote: > Hey, > > The performance of fftpack depends very strongly on the array size -- > sizes that are powers of two are good, but also powers of three, five and > seven, or numbers whose only prime factors are from (2,3,5,7). For problems > that

[Numpy-discussion] Fast sizes for FFT

2014-12-23 Thread Robert McGibbon
Hey, The performance of fftpack depends very strongly on the array size -- sizes that are powers of two are good, but also powers of three, five and seven, or numbers whose only prime factors are from (2,3,5,7). For problems that can use padding, rounding up the size (using np.fft.fft(x, n=size_wi