News for hackers. Stuff that matters.
Re:Uvloop: Fast Python networking by halayli on Wednesday May 04, 2016 @03:22AM (#11626762)
This isn't a fair comparison. the "HTTP server" presented isn't doing any checks / validation that a typical web server does.

Compare

https://github.com/MagicStack/vmbench/blob/master/servers/as...

to

https://github.com/nodejs/node/blob/master/lib/_http_outgoin...

https://github.com/nodejs/node/blob/master/lib/_http_server....

https://github.com/golang/go/blob/master/src/net/http/server...

The benchmark is almost equivalent to testing raw eventloop performance against a complete http server.

To make this test fair, you need to write the same code in asyncio_http_server.py in other languages.

Re:Uvloop: Fast Python networking by 1st1 on Wednesday May 04, 2016 @10:09AM (#11628447)
Keep in mind that the HTTP server in the benchmarks actually uses the httptools parser, which is a full-blown HTTP parser. A lot of heavy-lifting is done by the parser.

I plan to add a complete HTTP protocol implementation to httptools, but honestly, I don't expect it to be more than 20% slower.

Re:Uvloop: Fast Python networking by RedCrowbar on Wednesday May 04, 2016 @08:01AM (#11627705)
> This isn't a fair comparison. the "HTTP server" presented isn't doing any checks / validation that a typical web server does.

How so? It uses a binding to http-parser, just like nodejs.

Re:Uvloop: Fast Python networking by halayli on Wednesday May 04, 2016 @03:04PM (#11630802)
Parsing is just a small part of an http server. You can check the links I posted to see how much work is involved in validating http headers (after parsing), and creating http responses.
Re:Uvloop: Fast Python networking by felixweis on Wednesday May 04, 2016 @04:09AM (#11626909)
There is a TCP and a HTTP benchmark.