[Haskell-cafe] fast Array operations: foldl, drop
Andrew Coppin
andrewcoppin at btinternet.com
Thu Nov 29 15:54:15 EST 2007
Jules Bean wrote:
> As far as I'm aware, our arrays don't support any kind of zero-copy
> slicing, which is what your 'drop' trick amounts to.
>
> Zero-copy slicing would seem like an obviously nice thing to have for
> IArrays, though, I agree. For various different kinds of slices
> including projections.
>
> ByteString supports zero-copy substring, but it's based on ForeignPtr
> not UArray.
This is one of the many things I am often tempted to try to implement
myself...
In general, the IArray and MArray interfaces seem to be lacking a huge
number of functions which logically *should* be quite possible on an
array, they just aren't implemented. Maybe one day I'll sit down and
make a serious attempt to catelogue and implement them all...
More information about the Haskell-Cafe
mailing list