[Haskell-cafe] Mutable arrays
Chaddaï Fouché
chaddai.fouche at gmail.com
Fri Feb 8 09:18:55 EST 2008
Sorry for the french, I was a little bit confused...
On 08/02/08, Chaddaï Fouché <chaddai.fouche at gmail.com> wrote :
After I changed John's code so that it worked on the same dataset as mine, I
could benchmark both of them :
My solution is a bit faster (but that's a very tiny difference and to be
expected since John's fold are more general than mine), but in any case,
both solution are reasonably fast (2s on a 10M Double array (unboxed)) and
don't eat any more memory than necessary :
Anyway it would be nice to have some version of those function in the
standard library (MArray) since they are pretty useful and efficient. I
don't use functional language in order to have to code explicit loops on my
data structures !! ;-)
(And as we saw, to write an efficient generalisation of those loops isn't as
easy as it might seems)
--
Jedaï
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080208/4b67917f/attachment.htm
More information about the Haskell-Cafe
mailing list