3 ms·
If you download the FFTW http://www.fftw.org/ http://www.fftw.org/. At its heart is a OCaml program called genfft that generates optimized C fft routines for di
by kurtosis 17y ago
If you download the FFTW http://www.fftw.org/ http://www.fftw.org/. At its heart is a OCaml program called genfft that generates optimized C fft routines for different window lengths by computing a good recursive decomposition and minimizing the number of arithmetic operations. It represents the fft as a DAG and traverses it in a pure functional style maintaining the state of the optimizer using monads. I don't spend that much time looking at code these days, but this one blew me away when I spent a lot of time coding. It was so much more impressive to me than all of the elegant haskell implementations of different sorting algorithms because it solved a real problem and it was better than all of the competition