[Haskell-cafe] Re: hmatrix

Bulat Ziganshin bulat.ziganshin at gmail.com
Mon Jun 2 13:21:34 EDT 2008


Hello Anatoly,

>> Yes, I will try to write a simple version of Data.Array.ST...
> Wouldn't it be more efficient to use StorableArray, so you can cast

there is some difference between them - MutableByteArray# (used for
STUArray) is movable Haskell object which is subject to GC while
StorableArray has a fixed address and allocated through C malloc().
this makes MBA more appropriate for small arrays while SA should be
used for large ones because GC makes memory usage of program 3 times
larger


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list