4 Nov
2012
4 Nov
'12
4:19 p.m.
On Sun, Nov 4, 2012 at 8:11 AM, Ben Darnell <ben@bendarnell.com> wrote:
The extra system calls add up. The interface of Tornado's IOLoop was based on epoll (where the internal state is roughly a mapping {fd: event_set}), so it requires more register/unregister operations when running on kqueue (where the internal state is roughly a set of (fd, event) pairs). This shows up in benchmarks of the HTTPServer; it's faster on platforms with epoll than platforms with kqueue. In low-concurrency scenarios it's actually faster to use select() even when kqueue is available (or maybe that's a mac-specific quirk).
Awesome info! -- --Guido van Rossum (python.org/~guido)