[Haskell-cafe] Copy on read

Andrew Coppin andrewcoppin at btinternet.com
Mon May 12 16:05:44 EDT 2008

Matthew Naylor wrote:
> I wonder to what extent deforestation supersedes such optimisations.
> This would be a good topic to raise with a Cleaner.  The paper Neil
> mentions looks like a nice alternative to uniqueness typing -- and it
> appears that there will be a FitA talk about it, this Thursday.

What if you have, say, a giant array, and you run a loop that updates 
the entire array. Rather expensive to keep copying and collecting all 
that space. That's why most array-based code is explicitly in-place. But 
wouldn't it be nice if it didn't have to be?

Similarly, there are recursion patterns for which fusion isn't very 
easy. (How would you fuse, say, a Gaussian elimination algorithm?)

More information about the Haskell-Cafe mailing list