> I've enjoyed reading Simon Marlow's new tutorial on parallel and concurrent programming<br><br>I am interested: where I this tutorial?<br><br><div class="gmail_quote">2011/6/3 John D. Ramsdell <span dir="ltr"><<a href="mailto:ramsdell0@gmail.com">ramsdell0@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I've enjoyed reading Simon Marlow's new tutorial on parallel and<br>
concurrent programming, and learned some surprisingly basic tricks. I<br>
didn't know about the '-s' runtime option for printing statistics. I<br>
decided to compute speedups for a program I wrote just as Simon did,<br>
after running the program on an unloaded machine with four processors.<br>
When I did, I found the speedup on two processors was 2.4, on three<br>
it was 3.2, and on four it was 4.4! Am I living in a dream world?<br>
<br>
I ran the test nine more times, and here is a table of the speedups.<br>
<br>
2.35975 3.42595 4.39351<br>
1.57458 2.18623 2.94045<br>
1.83232 2.77858 3.41629<br>
1.58011 2.37084 2.94913<br>
2.36678 3.63694 4.42066<br>
1.58199 2.29053 2.95165<br>
1.57656 2.34844 2.94683<br>
1.58143 2.3242 2.95098<br>
2.36703 3.36802 4.41918<br>
1.58341 2.30123 2.93933<br>
<br>
That last line looks pretty reasonable to me, and is what I expected.<br>
Let's look at a table of the elapse times.<br>
<br>
415.67 176.15 121.33 94.61<br>
277.52 176.25 126.94 94.38<br>
321.37 175.39 115.66 94.07<br>
277.72 175.76 117.14 94.17<br>
415.63 175.61 114.28 94.02<br>
277.75 175.57 121.26 94.10<br>
277.68 176.13 118.24 94.23<br>
277.51 175.48 119.40 94.04<br>
415.58 175.57 123.39 94.04<br>
277.62 175.33 120.64 94.45<br>
<br>
Notice that the elapse times for two and four processors is pretty<br>
consistent, and the one for three processors is a little inconsistent,<br>
but the times for the single processor case are all over the map. Can<br>
anyone explain all this variance?<br>
<br>
I have enclosed the raw output from the runs and the script that was<br>
run ten times to produce the output.<br>
<font color="#888888"><br>
John<br>
</font><br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br>