[Haskell-cafe] fast Array operations: foldl, drop

Henning Thielemann lemming at henning-thielemann.de
Thu Nov 29 16:06:31 EST 2007

On Thu, 29 Nov 2007, Bryan O'Sullivan wrote:

> Henning Thielemann wrote:
> > I thought operations like "foldl'" and "drop" must be very fast on arrays
> > (especially UArray) with appropriate pointer tricks,
> These kinds of functions are only much use on one-dimensional arrays,
> which look sufficiently list-like that the ideas translate fairly
> cleanly.  For higher dimensions, there are enough options in terms of
> traversal direction and what exactly e.g. a fold should fold over
> (single elements? lower-dimensional slices?) that a sensible API doesn't
> exactly leap out.

That's unfortunately true. However, for my application (signal processing)
I need mostly one-dimensional arrays and they should support fast
"foldl'", slice, "build".

More information about the Haskell-Cafe mailing list