Benchmarks for Discrete Fourier Transform (DFT) calculations in R

Andrew J. Barbour · 2015

The DFT calculator in R,stats::fft, uses the Mixed-Radix algorithm of Singleton (1969). In this vignette we show how this calculator compares toFFT in thefftw package (Krey et al., 2011), which uses the FFTW algorithm of Frigo and Johnson (2005). For univariate DFT computations, the methods are nearly equivalent with two exceptions which are not mutually exclusive: (1) the series to be transformed is very long (10 6 terms), and especially (2) when the series length is not highly composite. In both exceptions the algorithm FFT outperformsfft. Update: I have decided that (for now)psd will not usefftw::FFT, despite its advantage overstats::fft for large-n ‘NHC’ series, simply because the binaries on CRAN have not been reliably built for some time now. If they do become reliable, I may consider using fftw::FFT instead.

Read the paper · More papers on PaperTik