The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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;
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.


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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.