Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: ifft very slow
Replies: 2   Last Post: Nov 19, 2012 3:24 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
paolo serena

Posts: 6
Registered: 5/22/08
ifft very slow
Posted: Nov 15, 2012 4:31 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi to all.

I was wondering why ifft is slow compared to fft. For instance, with the following code:

N = 2^16;
x=complex(randn(N,1),randn(N,1));
invN = 1/N;
tic, for k=1:1000, z=ifft(x);end,toc
tic, for k=1:1000, z2=conj(fft(conj(x)))*invN;end,toc

I got:

Elapsed time is 9.806159 seconds.
Elapsed time is 5.950683 seconds.

with max(abs(z-z2)) = 4.8487e-18. The speed improvement is significant (40%) and it is substantially what I observe in much more complex simulations. Can you explain me the reason? I also tried fftw('planner','patient'), without significant change.

Thanks
Paolo



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.