The performance of AnyEvent depends on the event loop used. If you use EV as event loop it will most likely be VERY fast and scalable (as the author of EV/libev optimized it a lot, see also: libev vs. libevent benchmark). If you use Tk or Glib as event loop the performance might not be the best.

AnyEvent is after all just a very thin abstraction layer.

The performance benchmark of multi-threaded vs. one-threaded with event loop is mostly a comparison of apples to bottles of beer:
For example: If you just have two threads per socket: one reader and one writer, your performance will most likely suck a lot, especially when your connection count rises that design wont scale well. But you could have an event loop per thread, and each thread could handle a specified amount of connections, which could be a way better solution.

So threads and event loops are after all two very orthogonal concepts.

Also note that enabling threads when compiling perl5 will degrade the overall performance of that perl5 build.


In reply to Re^2: AnyEvent for I/O events by elmex
in thread AnyEvent for I/O events by elmex

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.