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

Roman Leshchinskiy rl at cse.unsw.edu.au
Sat Nov 29 19:30:06 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:


>> 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.


More information about the Haskell-Cafe mailing list