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

Marc Lehmann schmorp at schmorp.de
Wed Jan 21 11:13:45 CET 2015


On Tue, Jan 20, 2015 at 06:04:11PM -0800, Hayk Martirosyan <hayk at stanford.edu> wrote:
> Can you briefly explain why this is the case?

Of course not, I am not a diviner - maybe your program is buggy, maybe
it's a cache issue, probably you didn't configure power saving settings
correctly (i.e. you have powersaving enabled...), maybe your scheduler is
lazy, maybe you configure your socket with delay, maybe you didn't figure
in task switching overhead etc. etc.

In general, computers get more efficient if you do things in bursts, that
isn't very surprising. What exactly is your problem can only be explained
by you, because we don't have your code, your system and probably not the
time to debug things for you.

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