[Haskell-cafe] Questions about slow GC with STArray

FFT fft1976 at gmail.com
Mon Apr 6 03:07:33 EDT 2009

I've been following with interest the recent discussions on reddit
about the extremely slow hash tables in Haskell compared to F# and
OCaml, and as I understood it, this performance problem is caused by
GC not liking mutable arrays

It appears from the discussion there that this is more than a simple
bug, but a fundamental difficulty (slow writes vs slow GC trade-off).
What I'm wondering though is how can this be unique to GHC: all arrays
in OCaml and probably F# are mutable (and usually unboxed). How is
this problem addressed there? Why is this supposed to be specific to
boxed arrays only: wouldn't GC have to scan the whole mutable array
whether it's boxed or unboxed?

More information about the Haskell-Cafe mailing list