[Haskell-cafe] Matrices in Haskell

Vincent Kraeutler vincent at kraeutler.net
Tue Mar 20 08:32:55 EDT 2007

Claus Reinke wrote:
>> When you tried using Arrays, I presume you used an array indexed by a
>> pair (i,j), and just reversed the order of the index pair to switch from
>> row-wise to column-wise access? It's hard to see how that would slow you
>> down. Perhaps the slowdown was caused by excessive array copying?
> the difference can be in locality wrt the memory hierarchy: is the
> next element
> nearby most of the time (apart from array borders), or a
> row-/column-width away most of the time?
> i understand that, eg, fortran and c differ in their default
> interpretations of array layout, so naively translated benchmarks
> might suffer from running against the grain in one of the two
> (row-major loops over a column-major layout, or the
> other way round).
> claus
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
it seems unlikely to me that this would cause a degradation in
performance with respect to lists...
or is there something very interesting to learn about the inner workings
of linked lists in ghc?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20070320/9e92ebc4/signature.bin

More information about the Haskell-Cafe mailing list