I ran some benchmarks on a teensy3 using a fairly simple fixed point FFT. The original routine used program memory for the sin table and a FIX_MPY routine to do scaled multiplies, but since the teensy has 32 and 16 bit ints and a lot more data memory, I modified it to just use the native multiply operation. This was done for *timing tests* only, so I've not checked the numerical accuracy.
N us
1024 8167
512 3750
256 1711
128 771
64 349
32 154
16 73
The last file below is a matlab/octave script to generate the FFT sine table with specified length and precision.
Test program to call FFT and time it
View attachment ffttest.ino
the sine table (1024 long, 32767 max value)
View attachment ffttab1024.h
the fft routine
View attachment fixfft.cpp
the .h to go with above
View attachment fixfft.h
matlab/octave to generate sine table
View attachment ffttab.m.txt
N us
1024 8167
512 3750
256 1711
128 771
64 349
32 154
16 73
The last file below is a matlab/octave script to generate the FFT sine table with specified length and precision.
Test program to call FFT and time it
View attachment ffttest.ino
the sine table (1024 long, 32767 max value)
View attachment ffttab1024.h
the fft routine
View attachment fixfft.cpp
the .h to go with above
View attachment fixfft.h
matlab/octave to generate sine table
View attachment ffttab.m.txt