[Haskell-cafe] Re: fftw bindings

David Roundy droundy at darcs.net
Thu Apr 19 21:49:07 EDT 2007


On Thu, Apr 19, 2007 at 05:46:49PM -0400, Al Falloon wrote:
> >For us less knowledgable, what's fftw?
> 
> "Fastest Fourier Transform in the West." http://www.fftw.org/
> 
> Its cool, they use generative programming: an OCaml program generates 
> "codlets" in C that can be composed and tuned to the specifics of your 
> machine, then compiled into a blazingly fast FFT/DFT library.

But that's only the beginning of the coolness! fftw uses runtime timings to
optimize each fourier transform based on the behavior of the computer on
which it is being run--its cache, memory speed, CPU, etc.  The result being
that fftw using portable C can beat out most hand-optimized fftw libraries
written in assembly! Steven (one of fftw's two authors) has done some
incredible work on optimizations.  The most unbelievable (to me) was that
by eliminating negative constants from the generated code (using
subtraction instead) they sped up the library on a particular architecture
by some some significant margin (I think I recall 20%).
-- 
David Roundy
http://www.darcs.net


More information about the Haskell-Cafe mailing list