Skip to content

Instantly share code, notes, and snippets.

@jimfulton
Last active December 15, 2015 21:39
Show Gist options
  • Save jimfulton/5327047 to your computer and use it in GitHub Desktop.
Save jimfulton/5327047 to your computer and use it in GitHub Desktop.
I've noticed that buildout tests run much slower on Python 3. This surprised people. I was curious how other things run. Pickling is much faster, https://t.co/y2mSHTDneZ. Here's an informal comparison using the wsgiref server.
# This is taken more or less verbatim from the Python docs for wsgiref
from wsgiref.simple_server import make_server, demo_app
httpd = make_server('', 8000, demo_app)
# Respond to requests until process is killed
httpd.serve_forever()
I ran the server redirecting outout to /dev/null on a dual core mac (2.66 Ghz CPU, Snow Leopard).
On the same machine <shrug> I ran ab with -c9 -n1000
Python version Time/request (ms)
-------------- ----------------
2.6 1.2
2.7 1.2
3.2 .83
3.3 .77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment