Libev vs. libevent benchmark (reloaded)

Gabriel Kerneis kerneis at
Mon Apr 12 13:46:22 CEST 2010


I tried to reproduce the libev vs. libevent benchmark found here:

The results are consistent but then tried to use libevent 2.0.4 (alpha)
instead of libevent 1.4.  In some cases (100,000 fds without timeout,
or 100,000 fds with timeout and libevent emulation), libevent is faster
than libev in terms of total time per iteration.  But libev remains
consistently faster when considering event processing only.

I ran the benchmark on an Intel Core2 Duo CPU E8500 @ 3.16GHz.  I wonder
if anyone could confirm these results on a different hardware.  AFAIU,
this seems to indicate that libevent is faster to setup the watchers,
whereas libev performs better during the polling/callback phase
(increasing num_writes reduces libevent's advantage, backing up this
hypothesis if I understand the benchmark correctly).

As an aside, Marc, did you keep the scripts you used to run the bench
and generate the graphics?  It would make it easier to compare the

[Of course, the next step is to reproduce the benchmark with CPC to
measure the overhead it introduces, but I'd like to understand what
happens before modifying anything.]

Gabriel Kerneis

More information about the libev mailing list