… | |
… | |
1695 | EV/Any 100000 224 2.88 0.34 0.27 EV + AnyEvent watchers |
1695 | EV/Any 100000 224 2.88 0.34 0.27 EV + AnyEvent watchers |
1696 | CoroEV/Any 100000 224 2.85 0.35 0.28 coroutines + Coro::Signal |
1696 | CoroEV/Any 100000 224 2.85 0.35 0.28 coroutines + Coro::Signal |
1697 | Perl/Any 100000 452 4.13 0.73 0.95 pure perl implementation |
1697 | Perl/Any 100000 452 4.13 0.73 0.95 pure perl implementation |
1698 | Event/Event 16000 517 32.20 31.80 0.81 Event native interface |
1698 | Event/Event 16000 517 32.20 31.80 0.81 Event native interface |
1699 | Event/Any 16000 590 35.85 31.55 1.06 Event + AnyEvent watchers |
1699 | Event/Any 16000 590 35.85 31.55 1.06 Event + AnyEvent watchers |
|
|
1700 | IOAsync/Any 16000 989 38.10 32.77 11.13 via IO::Async::Loop::IO_Poll |
|
|
1701 | IOAsync/Any 16000 990 37.59 29.50 10.61 via IO::Async::Loop::Epoll |
1700 | Glib/Any 16000 1357 102.33 12.31 51.00 quadratic behaviour |
1702 | Glib/Any 16000 1357 102.33 12.31 51.00 quadratic behaviour |
1701 | Tk/Any 2000 1860 27.20 66.31 14.00 SEGV with >> 2000 watchers |
1703 | Tk/Any 2000 1860 27.20 66.31 14.00 SEGV with >> 2000 watchers |
1702 | POE/Event 2000 6328 109.99 751.67 14.02 via POE::Loop::Event |
1704 | POE/Event 2000 6328 109.99 751.67 14.02 via POE::Loop::Event |
1703 | POE/Select 2000 6027 94.54 809.13 579.80 via POE::Loop::Select |
1705 | POE/Select 2000 6027 94.54 809.13 579.80 via POE::Loop::Select |
1704 | |
1706 | |
… | |
… | |
1733 | performance becomes really bad with lots of file descriptors (and few of |
1735 | performance becomes really bad with lots of file descriptors (and few of |
1734 | them active), of course, but this was not subject of this benchmark. |
1736 | them active), of course, but this was not subject of this benchmark. |
1735 | |
1737 | |
1736 | The C<Event> module has a relatively high setup and callback invocation |
1738 | The C<Event> module has a relatively high setup and callback invocation |
1737 | cost, but overall scores in on the third place. |
1739 | cost, but overall scores in on the third place. |
|
|
1740 | |
|
|
1741 | C<IO::Async> performs admirably well, about on par with C<Event>, even |
|
|
1742 | when using its pure perl backend. |
1738 | |
1743 | |
1739 | C<Glib>'s memory usage is quite a bit higher, but it features a |
1744 | C<Glib>'s memory usage is quite a bit higher, but it features a |
1740 | faster callback invocation and overall ends up in the same class as |
1745 | faster callback invocation and overall ends up in the same class as |
1741 | C<Event>. However, Glib scales extremely badly, doubling the number of |
1746 | C<Event>. However, Glib scales extremely badly, doubling the number of |
1742 | watchers increases the processing time by more than a factor of four, |
1747 | watchers increases the processing time by more than a factor of four, |
… | |
… | |
1820 | it to another server. This includes deleting the old timeout and creating |
1825 | it to another server. This includes deleting the old timeout and creating |
1821 | a new one that moves the timeout into the future. |
1826 | a new one that moves the timeout into the future. |
1822 | |
1827 | |
1823 | =head3 Results |
1828 | =head3 Results |
1824 | |
1829 | |
1825 | name sockets create request |
1830 | name sockets create request |
1826 | EV 20000 69.01 11.16 |
1831 | EV 20000 69.01 11.16 |
1827 | Perl 20000 73.32 35.87 |
1832 | Perl 20000 73.32 35.87 |
|
|
1833 | IOAsync 20000 157.00 98.14 epoll |
|
|
1834 | IOAsync 20000 159.31 616.06 poll |
1828 | Event 20000 212.62 257.32 |
1835 | Event 20000 212.62 257.32 |
1829 | Glib 20000 651.16 1896.30 |
1836 | Glib 20000 651.16 1896.30 |
1830 | POE 20000 349.67 12317.24 uses POE::Loop::Event |
1837 | POE 20000 349.67 12317.24 uses POE::Loop::Event |
1831 | |
1838 | |
1832 | =head3 Discussion |
1839 | =head3 Discussion |
1833 | |
1840 | |
1834 | This benchmark I<does> measure scalability and overall performance of the |
1841 | This benchmark I<does> measure scalability and overall performance of the |
1835 | particular event loop. |
1842 | particular event loop. |
… | |
… | |
1837 | EV is again fastest. Since it is using epoll on my system, the setup time |
1844 | EV is again fastest. Since it is using epoll on my system, the setup time |
1838 | is relatively high, though. |
1845 | is relatively high, though. |
1839 | |
1846 | |
1840 | Perl surprisingly comes second. It is much faster than the C-based event |
1847 | Perl surprisingly comes second. It is much faster than the C-based event |
1841 | loops Event and Glib. |
1848 | loops Event and Glib. |
|
|
1849 | |
|
|
1850 | IO::Async performs very well when using its epoll backend, and still quite |
|
|
1851 | good compared to Glib when using its pure perl backend. |
1842 | |
1852 | |
1843 | Event suffers from high setup time as well (look at its code and you will |
1853 | Event suffers from high setup time as well (look at its code and you will |
1844 | understand why). Callback invocation also has a high overhead compared to |
1854 | understand why). Callback invocation also has a high overhead compared to |
1845 | the C<< $_->() for .. >>-style loop that the Perl event loop uses. Event |
1855 | the C<< $_->() for .. >>-style loop that the Perl event loop uses. Event |
1846 | uses select or poll in basically all documented configurations. |
1856 | uses select or poll in basically all documented configurations. |