[Haskell-cafe] Data.Array.Storable vs GC

David F. Place d at vidplace.com
Tue Nov 25 08:45:28 EST 2008

If you have a giant unboxed array that will never become garbage, it
would be nice to put it somewhere where the GC won't bother with it.
Since Data.Array.Storable arrays are allocated in the C heap, I thought
it would be a good choice.

However, I am getting very poor performance due to the GC copying 6G in
each run.  The only explanation that I can think of is that it is
copying my giant array.  Am I wrong in my understanding that
Data.Array.Storable arrays should not be copied by the GC?

BTW, I am using GHC 6.10.1 on linux.

Thanks for reading.

More information about the Haskell-Cafe mailing list