On Sun, Nov 04, 2007 at 10:04:05PM -0800, Scott Lamb <[EMAIL PROTECTED]> wrote:
> Realistically, I think unit tests and bug reports/workarounds are about
> the only reason to blacklist specific event dispatchers. select() sucks,
> but well, that's why it's at the bottom of the list, right?

There is a hardcoded "priority" list that only incidentally has the same
order as the constants, but yes, select comes last, even if its usually
faster than poll :)

> If you are really concerned about syscall overhead (you mentioned it in
> another context, though I don't think it should be a major concern), you
> might want to prefer poll() to epoll() or kqueue() if you're going to

Yes, I thought about dynamically using select for a small (~50 or so) fd sets
as select is faster than epoll in many common small scenarios, but that is
mostly an epoll vs. poll issue.

For kqueue, I can't quite see the overhead, as kqueue has the same number
of syscalls per iteration as select/poll (namely one). the sysclal is more
complicated, but is likely faster than poll in all cases (I have zero
benchmark data on that, maybe the bsd people fucked it up, but likely,
they didn't :)

> But that's a situation where you'd want a little more coarseness: low
> startup overhead methods vs. low per-socket overhead ones. Resorting to
> naming specific event mechanisms seems undesirable in terms of older
> programs taking advantage of newer event facilities.

It is meant strictly as a benchmark, bug workaround, tuning mechanism. Less
being able to programmatically decide which is best but more offering the
user a mechanism to influence based on e.g. a config file, so one can
configure your mythical big app to use select because it performs better in

Choice isn't evil, as long as there is an obvious default choice if you
don't care (which is 0/EV_METHOD_AUTO).

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [EMAIL PROTECTED]
      -=====/_/_//_/\_,_/ /_/\_\
Libevent-users mailing list

Reply via email to