[Haskell-cafe] Faster timeout but is it correct?

Johan Tibell johan.tibell at gmail.com
Fri Feb 18 02:05:43 CET 2011


On Thu, Feb 17, 2011 at 5:01 PM, Bas van Dijk <v.dijk.bas at gmail.com> wrote:
> willTimeout/old         24.34945 us    1.0 x
> willTimeout/new         26.91964 us    0.9 x (large std dev: 5 us)
> willTimeout/event       12.94273 us    1.9 x  :-)
>
> wontTimeout/old         16.25766 us    1.0 x
> wontTimeout/new         637.8685 ns   25.5 x  :-)
> wontTimeout/event       1.565311 us   10.4 x  :-)

I find this very surprising. Both new and event eventually ends up
using the event manager in the end. One via threadDelay (which calls
registerTimeout) and one directly via registerTimeout. The difference
should be that "new" also spawns a thread.

Johan



More information about the Libraries mailing list