<br><br>
<div class="gmail_quote">On Wed, Apr 23, 2008 at 5:01 PM, Tillmann Vogt &lt;<a href="mailto:Tillmann.Vogt@rwth-aachen.de">Tillmann.Vogt@rwth-aachen.de</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br><br>I am currently experimenting with parallelizing C-programs. I have therefore written a matrix vector multiplication example that needs 13 seconds to run (5 seconds with OpenMP). Because I like Haskell I did the same in this language, but it takes about 134 seconds. Why is it so slow? Does someone have an idea?<br>
<br></blockquote>
<div>&nbsp;</div>
<div>Yes, in the C version you use unboxed arrays, in the Haskell version you use a linked list of linked lists. Naturally the latter will take up more space, require more work to index, and will thrash the cache quite a bit.</div>
</div>