Libev vs. libevent benchmark (reloaded)
Marc Lehmann
schmorp at schmorp.de
Mon Apr 19 01:30:31 CEST 2010
On Mon, Apr 19, 2010 at 01:26:33AM +0200, Marc Lehmann <schmorp at schmorp.de> wrote:
> Sorry, forgot to mention that this can easily explain the perceived
> performance, as libev does EPOLL_CTL_MOD, while libevent does
> EPOLL_CTL_ADD, which is faster in the benchmark case (it simply errors out
> without writing memory), but does not support fork.
If anybody who can actually benchmark this (I still can't), you can get the
same effect by replacing:
if (expect_true (!epoll_ctl (backend_fd, oev ? EPOLL_CTL_MOD : EPOLL_CTL_ADD, fd, &ev)))
with:
if (expect_true (!epoll_ctl (backend_fd, oev && oev != nev ? EPOLL_CTL_MOD : EPOLL_CTL_ADD, fd, &ev)))
in ev_epoll.c.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / schmorp at schmorp.de
-=====/_/_//_/\_,_/ /_/\_\
More information about the libev
mailing list