[Haskell-beginners] Re: Is Haskell for me?

Ben Lippmeier Ben.Lippmeier at anu.edu.au
Sat Nov 21 01:38:09 EST 2009


On 21/11/2009, at 15:36 , Jon Harrop wrote:

> The long-standing bug in GHC's garbage collector that makes writing a single 
> boxed value into an array O(n) instead of O(1), because the GC dirties and 
> retraverses the entire array, makes it impossible to write efficient Haskell 
> code to solve many basic problems.

Are you talking about http://hackage.haskell.org/trac/ghc/ticket/650 ?

The way I read that ticket is that writing a boxed value to a mutable array is still O(1), but the garbage collector traverses the whole array during scanning. That could certainly slow down GC cycles, but how does it make array update O(n)?

(update of the standard Haskell "pure" arrays being a separate issue, of course).

Ben.




More information about the Beginners mailing list