<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    When I first started benchmarking one of my Django sites,
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a href="http://trip-travel.ru/">http://trip-travel.ru/</a> (using
    postgres driver pypq),<br>
    I was disappointed by the results. PyPy was visually much slower
    than cPython (I just looked at how the site loads in the browser)<br>
    <br>
    But today I got some incredible results, I finally made PyPy to work
    faster than cPython, and found out that it got faster after loading
    the page several hundred times with "ab" or "siege"<br>
    <br>
    Here a the results, of mean response time by querying the home page
    with apache's "ab" (cPython 2.7.2, Django 1.3, PyPy 1.6.0), served
    with cherrypy wsgi server:<br>
    <br>
    After 10 requests (excluding the first request):<br>
    cPython - 163.529 ms<br>
    PyPy - 460.879 ms<br>
    <br>
    50 request more:<br>
    cPython - 168.539<br>
    PyPy - 249.850<br>
    <br>
    100 requests more:<br>
    cPython - 166.278 ms<br>
    PyPy - 131.104<br>
    <br>
    100 requests more:<br>
    cPython - 165.820 <br>
    PyPy - 115.446<br>
    <br>
    300 requests more:<br>
    cPython - 165.543<br>
    PyPy - 107.636<br>
    <br>
    300 requests more:<br>
    cPython - 166.425<br>
    PyPy - 103.065<br>
    <br>
    As we can see, the JIT needs much time to warm up, but when it does,
    the result is pretty noticeable.<br>
    By the way, with psycopg2, the site responds for 155.766 ms in
    average (only 10 ms faster), so using PyPy with Django makes much
    sense for me.<br>
    <br>
    As for now, pypy cannot run with uWSGI, which I use in production,
    but maybe i'll switch to PyPy for production deployments if "PyPy +
    PyPQ + Some pure python WSGI server" suite will outperform (uWSGI +
    cPython + psycopg2). Though, the need to load the page 500 times
    after each server reload is not comfortable.<a
      href="http://trip-travel.ru/"><br>
    </a>
  </body>
</html>