[Haskell-cafe] Slow mvar when compiled with threaded

Bob Ippolito bob at redivi.com
Wed Jan 8 03:15:17 UTC 2014


On Tuesday, January 7, 2014, Branimir Maksimovic wrote:

> On 01/07/2014 09:39 PM, Bob Ippolito wrote:
>
>> 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:
>>
> Great, thank you very much. You gave me material for learning ;)
> However, my version is significantly faster when compiling without
> -threaded.
> With -threaded option, your version is much faster than mine, but both are
> significantly slower
> then compile without -threaded.
>

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:

How exactly are you compiling?
Which OS?
What version of GHC and Haskell Platform? What is the exact command
line you execute it with?
What timings do you get?
What's the code for the server are you connecting to?
Loopback, local network, or internet?

-bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140107/5a9a4ab1/attachment.html>


More information about the Haskell-Cafe mailing list