On Tuesday, January 7, 2014, Branimir Maksimovic  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 01/07/2014 09:39 PM, Bob Ippolito wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Here's a much simpler implementation for that sort of pattern, using channels to fan out work to threads. I added a dependency on Criterion because getCPUTime is basically useless for this kind of measurement on Mac OS X since it doesn't include the time that the process spent waiting on IO:<br>

</blockquote>
Great, thank you very much. You gave me material for learning ;)<br>
However, my version is significantly faster when compiling without -threaded.<br>
With -threaded option, your version is much faster than mine, but both are significantly slower<br>
then compile without -threaded.<br>
</blockquote><div><br></div><div>Happy to look into it, I didn't have time today to do benchmarks (and Mac OS X is the worst platform to do this kind of testing on regardless of language, its network stack is inconsistent at best). I need to know more:</div>
<div><br></div><div>How exactly are you compiling?</div><div>Which OS?</div><div>What version of GHC and Haskell Platform? What is the exact command line you execute it with?</div><div>What timings do you get?</div><div>What's the code for the server are you connecting to?</div>
<div>Loopback, local network, or internet?</div><div><br></div><div>-bob</div>