ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent.pm (file contents):
Revision 1.85 by root, Fri Apr 25 13:51:32 2008 UTC vs.
Revision 1.86 by root, Fri Apr 25 14:01:48 2008 UTC

964maximal/minimal, respectively. Even when going through AnyEvent, it uses 964maximal/minimal, respectively. Even when going through AnyEvent, it uses
965far less memory than any other event loop and is still faster than Event 965far less memory than any other event loop and is still faster than Event
966natively. 966natively.
967 967
968The pure perl implementation is hit in a few sweet spots (both the 968The pure perl implementation is hit in a few sweet spots (both the
969zero timeout and the use of a single fd hit optimisations in the perl 969constant timeout and the use of a single fd hit optimisations in the perl
970interpreter and the backend itself, and all watchers become ready at the 970interpreter and the backend itself). Nevertheless this shows that it
971same time). Nevertheless this shows that it adds very little overhead in 971adds very little overhead in itself. Like any select-based backend its
972itself. Like any select-based backend its performance becomes really bad 972performance becomes really bad with lots of file descriptors (and few of
973with lots of file descriptors (and few of them active), of course, but 973them active), of course, but this was not subject of this benchmark.
974this was not subject of this benchmark.
975 974
976The C<Event> module has a relatively high setup and callback invocation cost, 975The C<Event> module has a relatively high setup and callback invocation cost,
977but overall scores on the third place. 976but overall scores on the third place.
978 977
979C<Glib>'s memory usage is quite a bit bit higher, but it features a 978C<Glib>'s memory usage is quite a bit bit higher, but it features a
990file descriptor is dup()ed for each watcher. This shows that the dup() 989file descriptor is dup()ed for each watcher. This shows that the dup()
991employed by some adaptors is not a big performance issue (it does incur a 990employed by some adaptors is not a big performance issue (it does incur a
992hidden memory cost inside the kernel, though, that is not reflected in the 991hidden memory cost inside the kernel, though, that is not reflected in the
993figures above). 992figures above).
994 993
995C<POE>, regardless of underlying event loop (wether using its pure perl 994C<POE>, regardless of underlying event loop (whether using its pure perl
996select-based backend or the Event module) shows abysmal performance and 995select-based backend or the Event module) shows abysmal performance and
997memory usage: Watchers use almost 30 times as much memory as EV watchers, 996memory usage: Watchers use almost 30 times as much memory as EV watchers,
998and 10 times as much memory as both Event or EV via AnyEvent. Watcher 997and 10 times as much memory as both Event or EV via AnyEvent. Watcher
999invocation is almost 900 times slower than with AnyEvent's pure perl 998invocation is almost 900 times slower than with AnyEvent's pure perl
1000implementation. The design of the POE adaptor class in AnyEvent can not 999implementation. The design of the POE adaptor class in AnyEvent can not

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines