[Haskell-cafe] ANN: two new packages: carray, fft

Jed Brown jed at 59A2.org
Fri Feb 15 12:07:51 EST 2008

On 15 Feb 2008, lemming at henning-thielemann.de wrote:

On Thu, 14 Feb 2008, Jed Brown wrote:

>> Hopefully these are mature enough to be generally useful.  I would
>> appreciate any comments regarding the interface.  The FFTW API is not
>> particularly nice for building a pure interface on.
> because FFTW stores global data (called 'plan's)

Yes.  In the Haskell interface, the existence of these plans is hidden
From the user.  In the advanced interface, you can influence the quality
of the plan which may effect how long a transform takes to compute, but
it will not effect the result.  If FFTW added the ability to query the
plan cache, or if we kept a mirror Haskell-side, then we could make
better use of memory which would improve performance.  Fortunately, we
have a really fast malloc.

>> Some of the transforms could be made slightly faster at the expense of
>> a much nastier interface, but unless someone needs the extra few
>> percent, or is pushing the memory limits on their machine, I'm not
>> inclined to expose the underlying nastiness.
> I want to mention once again that there is already a Fast Fourier
> transform for arbitrary length that is coded entirely in Haskell.
> http://hackage.haskell.org/packages/archive/dsp/0.2/doc/html/Numeric-Transform-Fourier-FFT.html

Indeed, this package does exist, but it is lacking compared to FFTW with
regard to multi-dimensional transforms, real to real transforms, and
performance (particularly for large sizes).

The transforms in the dsp package are only a few times slower than FFTW
for small sizes, but it quickly becomes orders of magnitude slower,
especially when the size is not a power of two.  It also uses several
times more memory, due in part to always using boxed arrays.  Modifying
dsp to allow use of unboxed arrays would be nice.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20080215/d4eed40f/attachment.bin

More information about the Haskell-Cafe mailing list