Re: Matrix multiplication
Tillmann Vogt <Tillmann.Vogt <at> rwth-aachen.de>
2008-05-03 18:57:04 GMT
Thanks for all your nice replies. I did this matrix-multiplication
experiment for a seminar on multithreading where I have to give a talk
on Unified Parallel C. At first I thought I should not mention haskell
as an alternative because of the speed. But now I might do some slides
about the advantages/(disadvantages?) of side-effekt free languages,
maybe ndp. In my opinion these C extension are not a nice solution.
Unified Parallel C parallelizes only for-loops and distributes the
workload by uniformly cutting an array in pieces and then setting an
"affinity" so that a CPU works on that data. The trick they are really
proud of is that the compiler knows in this way where to put the data in
a NUMA-system (Non-Uniform Memory Architecture). I am not really sure if
this language extension can cope with programs where pieces need
considerably different calulation times.
I forgot to mention that I used ghc 6.8.2 and sorry for that stupid
example (a had to take something that fits on a presentation-slide).
Don Stewart schrieb:
> The other thing here is that he's using unboxed, nested arrays in C,
> while using naive lists in Haskell.
> To actually compare them, you'd need to use nested STUArrays.
> Hopefully we'll have a library for these soon (as a result of the ndp
> lib). Otherwise, use on one of the matrix libraries (hmatrix/