How to find the cost for implementing an fft
Show older comments
I wantto find the cost involved in implementing an fft that is the number of multiplications and additions as i have a task to compare it with normal DFT function to see the difference between the cost in implementing both the functions.
Accepted Answer
More Answers (1)
Walter Roberson
on 8 Jan 2012
0 votes
You will have to analyze the code theoretically to say. It is not something that MATLAB can measure for you. cputime() and tic() and toc() and the profiler cannot give you this information. Neither can the High Precision Timer file exchange contribution.
Comparing to the native fft() call is not going to give you what you expect. You do not know how many multiplications and additions the native fft() uses, and you cannot find out.
All you are able to measure is execution time on the same inputs. That is not going to give you any way to compare fairly, as the native fft() is implemented through highly optimized C or C++ code (whereas your implementation will be in threaded interpreted MATLAB), and the native fft() will use multiple cores if available and if the problem is "large enough". You would be comparing implementation against implementation, rather than theory against theory.
Categories
Find more on Fourier Analysis and Filtering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!