I've also just noticed a lack in the vector library : multidimensional arrays seem to require indirections like in caml, whereas in C or in Data.Ix, there is a way to avoid this. This is especially important for avoiding cache misses with many dimensions, as well as for providing a clean interface. For instance if a 10x10 matrix is initialized unproperly like
Data.Vector.replicate 10 $ Data.Vector.replicate 10 0 The result is a total mess. Surely, every programmer knows that a computer has got memory, and that this memory has to be allocated, but from what I understand of haskell, I would expect the interface and the RTS to do it for me. And an integer multiplication, followed by an addition, is way cheaper than accessing uncached memory. Or maybe I do not understand that pipelines, hyperthreading and all that stuff would give you the same result ? El 15/05/2010, a las 20:02, Don Stewart escribió: > pierreetienne.meunier: >>> Perhaps you can look at the new array packages of the last few years: >>> >>> * vector >>> >>> An efficient implementation of Int-indexed arrays (both mutable and >>> immutable), with a powerful loop fusion optimization framework . >>> >>> http://hackage.haskell.org/package/vector >>> >>> * Repa >>> >>> High performance, regular, shape polymorphic parallel arrays. >>> >>> http://hackage.haskell.org/package/repa >> >> >> Indeed... Looks cool ! I suppose I'll have to rewrite a few things. >> Do you know why they aren't (yet ?) integrated into the hierarchicals ? >> > > Into the libraries distributed with the Haskell Platform, you mean? > Because no one has proposed this! > > http://trac.haskell.org/haskell-platform/wiki/AddingPackages > _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe