iosswiftsignal-processingfftvdsp

Why does the documentation say to use the vDSP_DFT instead of FFT


On apple documentation, it says

We suggest you use the DFT routines instead of these.

or

Use the DFT routines instead of these wherever possible. (For example, instead of calling vDSP_fft_zip with a setup created with vDSP_create_fftsetup, call vDSP_DFT_Execute(::::_:) with a setup created with vDSP_DFT_zop_CreateSetup(::_:).)

apple vDSP docs

What advantage would there be for using the DFT routines?


Solution

  • The DFT routines are newer, have more general interfaces, and have some features the old interfaces do not.

    One feature is that the DFT routines use a common setup database—when you create a DFT setup, you can pass a previous setup, and it will share some of the data if suitable.

    Some parts of the API were improved, I hope. For example, when creating a DFT setup, you simply specify the length you want. With the FFT, you had to specify the largest power of two that divided the length and separately specify if you wanted one, three, or five times that.

    Behind the scenes, the DFT routines and the FFT routines share code, so there should be negligible performance differences in most cases.