One-shot semantics in GHC event manager

Ben Gamari bgamari.foss at
Wed Oct 22 05:02:43 UTC 2014

Kazu Yamamoto <kazu at> writes:

>> Well, Bas was wondering whether this would be possible. At this point
>> I'm a bit on the fence; on one hand it's not a crucial fix (we have a
>> workaround in usb) and it may involve changes to exported interfaces
>> (although not very high visibility). On the other hand, it's a pretty
>> easy change to make and it cleans up the semantics of the event manager
>> nicely.
> I benchmarked your patches on GHC 7.8 branch:
> -N<n>          1       2        4        8        16
> ---------------------------------------------------------
> head           92,855  155,957  306,813  498,613  527,034
> 7.8.3          86,494  160,321  310,675  494,020  510,751
> 7.8.3+ben      84,472  140,978  291,550  488,834  523,837
> The inline patch works very nice. :-)

Out of curiosity are these numbers from single runs or do you average?
What are the uncertainties on these numbers? Even on the Rackspace
machines I was finding very large variances in my benchmarks, largely
due to far outliers. I didn't investigate too far but it seems that
a non-trivial fraction of connections were failing.

At some point it would be nice to chat about how we might replicate your
benchmarking configuration on the Rackspace boxen.

> # And I was disappointed a bit because GHC does not automatically do
> # this inline.
Yeah, this isn't the first time I've been caught assuming that GHC will

Thanks again for the benchmarking!


- Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <>

More information about the ghc-devs mailing list