… | |
… | |
935 | but this was not subjetc of this benchmark. |
935 | but this was not subjetc of this benchmark. |
936 | |
936 | |
937 | The C<Event> module has a relatively high setup and callback invocation cost, |
937 | The C<Event> module has a relatively high setup and callback invocation cost, |
938 | but overall scores on the third place. |
938 | but overall scores on the third place. |
939 | |
939 | |
940 | C<Glib>'s memory usage is quite a bit bit higher, features a faster |
940 | C<Glib>'s memory usage is quite a bit bit higher, but it features a |
941 | callback invocation and overall lands in the same class as C<Event>. |
941 | faster callback invocation and overall ends up in the same class as |
|
|
942 | C<Event>. However, Glib scales extremely badly, doubling the number of |
|
|
943 | watchers increases the processing time by more than a factor of four, |
|
|
944 | making it completely unusable when using larger numbers of watchers |
|
|
945 | (note that only a single file descriptor was used in the benchmark, so |
|
|
946 | inefficiencies of C<poll> do not account for this). |
942 | |
947 | |
943 | The C<Tk> adaptor works relatively well, the fact that it crashes with |
948 | The C<Tk> adaptor works relatively well. The fact that it crashes with |
944 | more than 2000 watchers is a big setback, however, as correctness takes |
949 | more than 2000 watchers is a big setback, however, as correctness takes |
945 | precedence over speed. Nevertheless, its performance is surprising, as the |
950 | precedence over speed. Nevertheless, its performance is surprising, as the |
946 | file descriptor is dup()ed for each watcher. This shows that the dup() |
951 | file descriptor is dup()ed for each watcher. This shows that the dup() |
947 | employed by some adaptors is not a big performance issue (it does incur a |
952 | employed by some adaptors is not a big performance issue (it does incur a |
948 | hidden memory cost inside the kernel, though). |
953 | hidden memory cost inside the kernel, though). |
… | |
… | |
962 | Using EV through AnyEvent is faster than any other event loop, but most |
967 | Using EV through AnyEvent is faster than any other event loop, but most |
963 | event loops have acceptable performance with or without AnyEvent. |
968 | event loops have acceptable performance with or without AnyEvent. |
964 | |
969 | |
965 | The overhead AnyEvent adds is usually much smaller than the overhead of |
970 | The overhead AnyEvent adds is usually much smaller than the overhead of |
966 | the actual event loop, only with extremely fast event loops such as the EV |
971 | the actual event loop, only with extremely fast event loops such as the EV |
967 | adds Anyevent significant overhead. |
972 | adds AnyEvent significant overhead. |
968 | |
973 | |
969 | And you should simply avoid POE like the plague if you want performance or |
974 | And you should simply avoid POE like the plague if you want performance or |
970 | reasonable memory usage. |
975 | reasonable memory usage. |
971 | |
976 | |
972 | |
977 | |