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

Bryan O'Sullivan bos at serpentine.com
Thu Nov 29 13:27:46 EST 2007

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.


More information about the Haskell-Cafe mailing list