… | |
… | |
871 | event models natively and with anyevent. The benchmark creates a lot of |
871 | event models natively and with anyevent. The benchmark creates a lot of |
872 | timers (with a zero timeout) and io watchers (watching STDOUT, a pty, to |
872 | timers (with a zero timeout) and io watchers (watching STDOUT, a pty, to |
873 | become writable, which it is), lets them fire exactly once and destroys |
873 | become writable, which it is), lets them fire exactly once and destroys |
874 | them again. |
874 | them again. |
875 | |
875 | |
|
|
876 | Rewriting the benchmark to use many different sockets instead of using |
|
|
877 | the same filehandle for all io watchers results in a much longer runtime |
|
|
878 | (socket creation is expensive), but qualitatively the same figures, so it |
|
|
879 | was not used. |
|
|
880 | |
876 | =head2 Explanation of the columns |
881 | =head2 Explanation of the columns |
877 | |
882 | |
878 | I<watcher> is the number of event watchers created/destroyed. Since |
883 | I<watcher> is the number of event watchers created/destroyed. Since |
879 | different event models feature vastly different performances, each event |
884 | different event models feature vastly different performances, each event |
880 | loop was given a number of watchers so that overall runtime is acceptable |
885 | loop was given a number of watchers so that overall runtime is acceptable |
… | |
… | |
928 | natively and the pure perl backend), and no faster event models, not even |
933 | natively and the pure perl backend), and no faster event models, not even |
929 | C<Event> natively. |
934 | C<Event> natively. |
930 | |
935 | |
931 | The pure perl implementation is hit in a few sweet spots (both the |
936 | The pure perl implementation is hit in a few sweet spots (both the |
932 | zero timeout and the use of a single fd hit optimisations in the perl |
937 | zero timeout and the use of a single fd hit optimisations in the perl |
933 | interpreter and the backend itself). Nevertheless tis shows that it |
938 | interpreter and the backend itself, and all watchers become ready at the |
934 | adds very little overhead in itself. Like any select-based backend its |
939 | same time). Nevertheless this shows that it adds very little overhead in |
935 | performance becomes really bad with lots of file descriptors, of course, |
940 | itself. Like any select-based backend its performance becomes really bad |
|
|
941 | with lots of file descriptors (and few of them active), of course, but |
936 | but this was not subject of this benchmark. |
942 | this was not subject of this benchmark. |
937 | |
943 | |
938 | The C<Event> module has a relatively high setup and callback invocation cost, |
944 | The C<Event> module has a relatively high setup and callback invocation cost, |
939 | but overall scores on the third place. |
945 | but overall scores on the third place. |
940 | |
946 | |
941 | C<Glib>'s memory usage is quite a bit bit higher, but it features a |
947 | C<Glib>'s memory usage is quite a bit bit higher, but it features a |