[Python-ideas] Async API: some code to review
Guido van Rossum
guido at python.org
Tue Oct 30 21:24:23 CET 2012
On Tue, Oct 30, 2012 at 12:46 PM, Richard Oudkerk <shibturn at gmail.com> wrote:
> The difference in speed between AF_INET sockets and pipes on Windows is much
> bigger than the difference between AF_INET sockets and pipes on Unix.
>
> (Who knows, maybe it is just my firewall which is causing the slowdown...)
Here's another unscientific benchmark: I wrote a stupid "http" server
(stupider than echosvr.py actually) that accepts HTTP requests and
responds with the shortest possible "200 Ok" response. This should
provide an adequate benchmark of how fast the event loop, scheduler,
and transport are at accepting and closing connections (and reading
and writing small amounts). On my linux box at work, over localhost,
it seems I can handle 10K requests (sent using 'ab' over localhost) in
1.6 seconds. Is that good or bad? The box has insane amounts of memory
and 12 cores (?) and rates at around 115K pystones.
(I tried to repro this on my Mac, but I am running into problems,
perhaps due to system limits.)
--
--Guido van Rossum (python.org/~guido)
More information about the Python-ideas
mailing list