… | |
… | |
1133 | =head3 Discussion |
1133 | =head3 Discussion |
1134 | |
1134 | |
1135 | The benchmark tries to test the performance of a typical small |
1135 | The benchmark tries to test the performance of a typical small |
1136 | server. While knowing how various event loops perform is interesting, keep |
1136 | server. While knowing how various event loops perform is interesting, keep |
1137 | in mind that their overhead in this case is usually not as important, due |
1137 | in mind that their overhead in this case is usually not as important, due |
1138 | to the small absolute number of watchers. |
1138 | to the small absolute number of watchers (that is, you need efficiency and |
|
|
1139 | speed most when you have lots of watchers, not when you only have a few of |
|
|
1140 | them). |
1139 | |
1141 | |
1140 | EV is again fastest. |
1142 | EV is again fastest. |
1141 | |
1143 | |
1142 | The C-based event loops Event and Glib come in second this time, as the |
1144 | The C-based event loops Event and Glib come in second this time, as the |
1143 | overhead of running an iteration is much smaller in C than in Perl (little |
1145 | overhead of running an iteration is much smaller in C than in Perl (little |
1144 | code to execute in the inner loop, and perl's function calling overhead is |
1146 | code to execute in the inner loop, and perl's function calling overhead is |
1145 | high, and updating all the data structures is costly). |
1147 | high, and updating all the data structures is costly). |
1146 | |
1148 | |
1147 | The pure perl event loop is much slower, but still competitive. |
1149 | The pure perl event loop is much slower, but still competitive. |
1148 | |
1150 | |
1149 | POE also performs much better in this case, but is is stillf ar behind the |
1151 | POE also performs much better in this case, but is is still far behind the |
1150 | others. |
1152 | others. |
1151 | |
1153 | |
1152 | =head3 Summary |
1154 | =head3 Summary |
1153 | |
1155 | |
1154 | =over 4 |
1156 | =over 4 |