Why does the FWHT function calculate slower than the FFT function, even though the documentation says they use similar algorithms?

5 views (last 30 days)
I am using the FFT and the FWHT function. I was expecting them to take around the same time to compute since the documentation page for FWHT says, "The fast Walsh-Hadamard transform algorithm is similar to the Cooley-Tukey algorithm used for the FFT. Both use a butterfly structure to determine the transform coefficients."
Instead, I have found that it only takes 0.5 seconds to calculate the FFT of my matrix, whereas it takes 5 seconds to calculate the FWHT of my matrix. What is causing this difference in performance?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 11 Feb 2020
MATLAB's FFT functions use a 3rd-party C library called FFTW, allowing them to be very quick.
FWHT does not use a third party library, and instead is calculated using for loops, which causes slower calculation speeds. To see the FWHT algorithm implementation in MATLAB, run the following command in the MATLAB command window to open the function's M-file:
>> edit fwht

More Answers (0)

Products


Release

R2017a

Community Treasure Hunt

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

Start Hunting!