while(true) { ev_run(loop, EVRUN_NOWAIT); } much faster than ev_run(loop);

Marc Lehmann schmorp at schmorp.de
Tue Jan 20 09:26:43 CET 2015


On Mon, Jan 19, 2015 at 05:33:10PM -0800, Hayk Martirosyan <hayk at stanford.edu> wrote:
> I'm using libev in a high-performance application, and I've noticed against
> my expectation that looping ev_run with EVRUN_NOWAIT handles events 5x
> faster than calling ev_run without the loop. Is this expected behavior?

Depending on how you handle the events, your hardware and your kernel, and
what you mean by "5x faster" this can well be the case, yes.

-- 
                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