Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-20 Thread Henry Gomersall
On 20/11/13 19:56, Chris Barker wrote: > On Wed, Nov 20, 2013 at 3:06 AM, Henry Gomersall > wrote: > > Yes, this didn't occur to me as an option, mostly because I'm keen for a > commercial FFTW license myself and it would gall me somewhat if I > couldn't gain th

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-20 Thread Chris Barker
On Wed, Nov 20, 2013 at 3:06 AM, Henry Gomersall wrote: > Yes, this didn't occur to me as an option, mostly because I'm keen for a > commercial FFTW license myself and it would gall me somewhat if I > couldn't gain the same benefit from my own code as others. > > So, given that, if anyone has an

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-20 Thread Henry Gomersall
On 19/11/13 17:52, Nathaniel Smith wrote: > On Tue, Nov 19, 2013 at 9:17 AM, Henry Gomersall wrote: >> >On 19/11/13 16:08, Stéfan van der Walt wrote: >>> >>On Tue, Nov 19, 2013 at 6:03 PM, Henry Gomersall wrote: > >>> >However, FFTW is dual licensed GPL/commercial and so the wrappers are >>>

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-19 Thread Nathaniel Smith
On Tue, Nov 19, 2013 at 9:17 AM, Henry Gomersall wrote: > On 19/11/13 16:08, Stéfan van der Walt wrote: >> On Tue, Nov 19, 2013 at 6:03 PM, Henry Gomersall wrote: >>> >However, FFTW is dual licensed GPL/commercial and so the wrappers are >>> >also GPL by necessity. >> I'm not sure if that is true

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-19 Thread Henry Gomersall
On 19/11/13 16:08, Stéfan van der Walt wrote: > On Tue, Nov 19, 2013 at 6:03 PM, Henry Gomersall wrote: >> >However, FFTW is dual licensed GPL/commercial and so the wrappers are >> >also GPL by necessity. > I'm not sure if that is true, strictly speaking--you may license your > wrapper code under

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-19 Thread Stéfan van der Walt
On Tue, Nov 19, 2013 at 6:03 PM, Henry Gomersall wrote: > However, FFTW is dual licensed GPL/commercial and so the wrappers are > also GPL by necessity. I'm not sure if that is true, strictly speaking--you may license your wrapper code under any license you wish. It's just that it becomes confus

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-19 Thread Henry Gomersall
On 19/11/13 16:00, Charles Waldman wrote: > How about FFTW? I think there are wrappers out there for that ... Yes there are! (complete with the numpy.fft API) https://github.com/hgomersall/pyFFTW However, FFTW is dual licensed GPL/commercial and so the wrappers are also GPL by necessity. Cheer

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-19 Thread Charles Waldman
How about FFTW? I think there are wrappers out there for that ... On Mon, Nov 18, 2013 at 9:26 PM, Charles R Harris wrote: > > > > On Mon, Nov 18, 2013 at 3:35 PM, Oscar Benjamin < > oscar.j.benja...@gmail.com> wrote: > >> On 14 November 2013 17:19, David Cournapeau wrote: >> > On Thu, Nov 14

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-18 Thread Charles R Harris
On Mon, Nov 18, 2013 at 3:35 PM, Oscar Benjamin wrote: > On 14 November 2013 17:19, David Cournapeau wrote: > > On Thu, Nov 14, 2013 at 4:45 PM, Charles Waldman > wrote: > >> > >> Can you post the raw data? It seems like there are just a couple of > "bad" > >> sizes, I'd like to know more preci

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-18 Thread Oscar Benjamin
On 14 November 2013 17:19, David Cournapeau wrote: > On Thu, Nov 14, 2013 at 4:45 PM, Charles Waldman wrote: >> >> Can you post the raw data? It seems like there are just a couple of "bad" >> sizes, I'd like to know more precisely what these are. > > Indeed. Several of the sizes generated by log

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-15 Thread David Cournapeau
On Fri, Nov 15, 2013 at 10:47 PM, Max Linke wrote: > On Thu, 2013-11-14 at 17:19 +, David Cournapeau wrote: > > On Thu, Nov 14, 2013 at 4:45 PM, Charles Waldman > wrote: > > > > > Can you post the raw data? It seems like there are just a couple of > "bad" > > > sizes, I'd like to know more

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-15 Thread Max Linke
On Thu, 2013-11-14 at 17:19 +, David Cournapeau wrote: > On Thu, Nov 14, 2013 at 4:45 PM, Charles Waldman wrote: > > > Can you post the raw data? It seems like there are just a couple of "bad" > > sizes, I'd like to know more precisely what these are. > > > > Indeed. Several of the sizes ge

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-14 Thread David Cournapeau
On Thu, Nov 14, 2013 at 7:05 PM, Jaime Fernández del Río < jaime.f...@gmail.com> wrote: > On Thu, Nov 14, 2013 at 9:37 AM, David Cournapeau wrote: > >> >> You can for example compare np.fft.fft(a) for 2**16 and 2**16+1 (and >> 2**16-1 that while bad is not prime, so only 1 order of magnitude slowe

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-14 Thread Jaime Fernández del Río
On Thu, Nov 14, 2013 at 9:37 AM, David Cournapeau wrote: > > You can for example compare np.fft.fft(a) for 2**16 and 2**16+1 (and > 2**16-1 that while bad is not prime, so only 1 order of magnitude slower). > I actually did... Each step of a FFT basically splits a DFT of size N = P*Q into P DFTs

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-14 Thread David Cournapeau
On Thu, Nov 14, 2013 at 5:30 PM, Max Linke wrote: > You can check everything in the notebook, it will generate all the data. > I checked the runtime for sizes in logspace(2, 7, 25). I know that the > fft will work faster for array sizes that are a power of 2 but > differences on 3 orders of magni

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-14 Thread Max Linke
You can check everything in the notebook, it will generate all the data. I checked the runtime for sizes in logspace(2, 7, 25). I know that the fft will work faster for array sizes that are a power of 2 but differences on 3 orders of magnitude is huge. I also attached a script generated from the no

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-14 Thread Robert Kern
On Thu, Nov 14, 2013 at 5:30 PM, Max Linke wrote: > > You can check everything in the notebook, it will generate all the data. > I checked the runtime for sizes in logspace(2, 7, 25). I know that the > fft will work faster for array sizes that are a power of 2 but > differences on 3 orders of magn

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-14 Thread Robert Kern
On Thu, Nov 14, 2013 at 4:45 PM, Charles Waldman wrote: > > Can you post the raw data? It seems like there are just a couple of "bad" sizes, I'd like to know more precisely what these are. > > It's typical for FFT to perform better at a sample size that is a power of 2, and algorithms like FFTW t

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-14 Thread David Cournapeau
On Thu, Nov 14, 2013 at 4:45 PM, Charles Waldman wrote: > Can you post the raw data? It seems like there are just a couple of "bad" > sizes, I'd like to know more precisely what these are. > Indeed. Several of the sizes generated by logspace(2, 7, 25) are prime numbers, where numpy.fft is actua

Re: [Numpy-discussion] strange runtimes of numpy fft

2013-11-14 Thread Charles Waldman
Can you post the raw data? It seems like there are just a couple of "bad" sizes, I'd like to know more precisely what these are. It's typical for FFT to perform better at a sample size that is a power of 2, and algorithms like FFTW take advantage of factoring the size, and "sizes that are product