Those two libraries share the similar philosophy and the similar design decisions as a result. But this popular WSGI benchmark says eventlet
is way slower than gevent
. What do make their performance so different?
As I know key differences between them are:
gevent
intentionally depends on and is coupled tolibev
(libevent
, previously) whileeventlet
defines independent reactor interface and implements particular adapters usingselect
,epoll
, and Twisted reactor behind it. Does additional reactor interface make critical performance hits?gevent
is mostly written in Cython whileeventlet
is written in pure Python. Is natively compiled Cython so faster than pure Python, for not-so-much-computational but IO-bound programs?Primitives of
gevent
emulate standard libraries’ interfaces whileeventlet
’s primitives differ from standard and provides additional layer to emulate it. Does additional emulation layer makeseventlet
slower?Is the implementation of
eventlet.wsgi
just worse thangevent.pywsgi
?
I really wonder, because they overall look so similar for me.