Packages are npm-searched by keywords fourier
, fft
and alike.
The task is to process waveform of 4096 real/imaginary numbers 1000 times. Results show total time taken in my laptop (lenovo x220 if it makes sense) in node6.
- fft-asm.js 0.7s
- fili 8s
- ml-fft 0.32s
- ndarray-fft 0.37s
- fft 4s
- dsp-fft 40s
- webgl-dft 5.4s
- corbanbrook/dsp.js
- fft 0.222s
- rfft (real-values only FFT) 0.098s ★
- dft 160s
- dspjs — incredibly weird fork of dsp.js with no
module.exports
. How are we supposed to use it? - digitalsignals — old fork of dsp.js
- fft 0.321s
- rfft (real-values only FFT) 0.139s
- dft 150s
- fft-js
- fft 39.4s
- fftInPlace 120s
- dft ∞s (I waited like for a couple of mins for single run and then bored)
- aureoom-js-fft 11s
- stft 1.5s
- frequencyjs
- dft 730s
- fft 1.088s
- fourier
- fft 0.375s
- dft 96s
- ditRadix2 0.315s
- ditRadix2Simple 0.731s
- fft-32-raw 0.29s
- fft-32-asm 0.38s
PS. Correctness of transforms is not verified, we trust developers in that sense.
PPS. Results are opinionated single-run measurements, so there are deviations, but relative performance is demonstrative.
PPPS. I did not do any research of options of these packages, just used default settings. Quite possibly some packages use windowing, table creation or other pre-calculation which affects performance and can be disabled.
PPPPS. I was unable to compile dsp, node-fft, kissfft. They have native bindings and may render decent results.
PPPPPS. If you feel like running benchmark for yourself or contributing: clone repo, do npm install
and npm test
.