# Is ifft(fft(x).*fft(h)) faster or conv(x,h) ?

52 views (last 30 days)

Show older comments

Dear All,

I need to find out which one is faster to obtain convolution? - Linear convolution using just 'conv'? - or Obtaining Convolution from ifft(fft)? As far as I have coded and identified using tic/toc, that Matlab performs linear convolution faster than ifft(fft). But textbooks say fft is faster.

##### 4 Comments

Rik
on 11 Mar 2020

### Answers (2)

Rik
on 11 Mar 2020

Why would a textbook say ifft(fft()) is faster? That doens't make sense. If that was the case, Mathworks would have implemented conv a bit like this:

function out=conv(x,h)

out=ifft(fft(x).*fft(h));

end

The mere fact that they didn't should tell you the real conv function is faster than the one I put here.

##### 0 Comments

Honglei Chen
on 11 Mar 2020

Time is not the best way to compare the two approaches. Rather, the best approach to describe is the computation complexity, i.e., when the size of the signal increases, how does the time of computation increases accordingly. It is in this comparison that the FFt approach shows the advantage. The theory should be available in any standard DSP text book and here is a webpage for a summary

HTH

##### 1 Comment

Rik
on 11 Mar 2020

### See Also

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!