MATLAB: How to efficiently implement algorithm similar to FFT

fft

I am implementing an algorithm similar to FFT. The only difference is that I'm using my own custom twiddle factors for the butterfly operation to combine smaller DFTs into larger DFTs which is implemented through multiplication of matrices.
However, I am not getting the same performance as the regular FFT built in function. Is it a function of how I'm writing my code?

Best Answer

If you write your customized butterfly operations as sparse matrix multiplications (see the SPARSE command), you might be able to get the benefit of multi-threading, similar to the FFT command.
Related Question