Ok, I have enough for a benchmark, just short of being able to provide a
working implementation.

I actually ran out of memory with the Stem implementation, it seems to use
a lot of additional memory when running the event loop. I had to reduce
the number of handles to 20000.

Otherwise, it looks quite good (this is the synthetic benchmark that
doesn't test event loop performance, just overheads):

          name watchers bytes create invoke 
         EV/EV   100000   244   0.54   0.45 
      Perl/Any   100000   513   4.61   0.87 
      Stem/Any    20000  1159  31.51   9.12 
     Event/Any    16000   936  38.80  31.91 
       POE/Any     2000  6658 108.61 726.39 

It is only 10 times slower than anyevents pure perl backend, but three
times faster than Event.

For the large server benchmark, it still looks very good:

    name sockets create  request 
      EV   20000  68.51    10.65 
    Perl   20000  73.58   112.90 
   Event   20000 199.29   252.45 
    Stem   20000 128.11   660.92 
    Glib   20000 632.13  1818.40 
     POE   20000 344.56 12154.89 

Only 6 times slower than anyevents pure perl backend, but faster than Glib
(ok, glib clearly has issues :)

So it is actually quite good, and quite usable, except for the out of
memory issue.

(This is without the multiple watchers per fd/combo workaround, btw.,
which would only affect create speed).

It hurts a bit to come so far and then to only fail because stem has no
one_iteration-like functionality, though (I would go with busy waiting, if
that were implementable, but thats not reasonable to implement either).

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

Reply via email to