3 ms·
It is interesting that uvloop-streams is almost identical to gevent in performance. Gevent is based on libev, the project libuv was forked from. What exactly i
by smegel 10y ago
It is interesting that uvloop-streams is almost identical to gevent in performance. Gevent is based on libev, the project libuv was forked from.
What exactly is the -streams addition that makes uvloop-streams perform so much worse than plain uvloop?
- 1st1 10y agoStreams implementation is a pretty big chunk of Python code, that manages flow control, buffering, and integration with coroutines. And you don't always need all that stuff when you're writing a protocol, since you can implement them more efficiently as part of protocol parser.
- smegel 10y agoIs it possible to add a benchmark for gevent using raw sockets not StreamServer (assuming that adds similar overhead).
- 1st1 10y agoAFAIK, StreamServer should actually affect benchmark in a positive way. In gevent case, StreamServer isn't about high-level abstractions, it's about making sure that client sockets always have a READ flag in the IO multiplexor (epoll, kqueue etc)