[Haskell-cafe] Re: Go Haskell! -> array libraries

Don Stewart dons at galois.com
Sat Nov 29 19:36:50 EST 2008

> On 30/11/2008, at 08:32, Andrew Coppin wrote:
> >Henning Thielemann wrote:
> >>I suspect that this particular function is less useful than you  
> >>think.
> >>It safes one allocation and might be faster since it uses less cache,
> >>but on the other hand, it cannot be fused.
> Hmm, I haven't seen your original message but I suspect you are  
> talking about in-place map. In that case, this is not entirely true.  
> Shameless plug:
> http://www.cse.unsw.edu.au/~rl/publications/recycling.html
> >>I think in-place array
> >>updates are only sensible for writing array elements in really random
> >>order. As long as you can formulate your algorithm the way "read from
> >>random indices, but write a complete array from left to right",  
> >>there is
> >>almost no need for mutable arrays.
> Many array algorithms cannot really be written in this way. I think we  
> do need mutable arrays and they should provide much more than just  
> read/write. How to integrate them nicely with immutable arrays is not  
> really clear, though.

Should mutable arrays have list-like APIs? All the usual operations,
just in-place and destructive where appropriate?

-- Don

More information about the Haskell-Cafe mailing list