[Baypiggies] Java or Python? (was: PERL or PYTHON)

Damon McCormick damonmc at gmail.com
Wed Oct 28 21:10:00 CET 2009

That quote about them being .8-2x slower than CPython should be taken in

The PyPy project created a series of prototype JITs, culminating in their
5th prototype, which--for benchmarks of trivial loops--gave performance
"20-30x over CPython" (see the April 21 post "Roadmap for JIT").  Then the
PyPy developers switched focus from prototype to production.  This involved
rewriting the JIT from scratch in a more stable, maintainable way--with an
emphasis on Python 2.5 compatibility--using what they learned from the
prototypes.  The April 19 quote you sent was from a low point,
performance-wise.  It was during the beta of the newly rewritten 1.1 JIT,
which did not yet include any JIT optimizations.  It seems likely that the
Django test you mentioned was run on a version not too different from this

As the more recent blog posts indicate, they are making progress on
GC/memory/runtime optimizations.

>From June 23's JIT Progress <http://JIT+progress> post about optimizing
frame overhead with virtualizables:
a long-running loop typically runs 50% faster than CPython. That's
"baseline" speed, moreover: we will get better speed-ups by applying
optimizations on the generated code.

>From July 17's PyPy Numeric Experiments <http://PyPy+numeric+experiments>post:
CPython (pure Python)  11s
PyPy with JIT (pure Python)  0.91s

>From Sept 27th's First Results of the
(using "richards", a medium sized benchmark that simulates
the task dispatcher in the kernel of an operating system):

   - 8.18 seconds with CPython 2.5.2;
   - 2.61 seconds with pypy-c-jit (3x faster than CPython);
   - 1.04 seconds if you ignore the time spent making assembler (8x faster
   than CPython);
   - 1.59 seconds on Psyco, for reference (5x faster that CPython).


I'm not working on the project and haven't even run a recent PyPy--I've just
been following progress on their blog--so I have no idea how their posted
results on small benchmarks match what you'd get on a real application like
Django. It will be very interesting to find out.


On Thu, Oct 22, 2009 at 5:52 PM, Benjamin Sergeant <bsergean at gmail.com>wrote:

> Now that you mention it, did anyone ever tried Django running with PyPy ?
> (
> Instruction there http://code.djangoproject.com/wiki/DjangoAndPyPy
> """
> The Python interpreter is now between 0.8-2x (and in some corner case
> 3-4x) slower than CPython
> """
> )
> On a related note, I'm curious to know if anyone ever profiled a
> typical django web request, starting when the HTTP request arrive on
> the server and until the response is sent back (including what's
> happening inside the web server mod_python / mod_wsgi / nginx -
> fastcgi ....). The Linux guys have nice charts saying what's happening
> during booting, it would be cool to have something similar for web
> apps.
> http://www.bootchart.org/images/bootchart.png
> Cheers,
> - Benjamin
> On Thu, Oct 22, 2009 at 5:19 PM, Damon McCormick <damonmc at gmail.com>
> wrote:
> > Not to mention PyPy.
> > -Damon
> >
> > On Fri, Oct 16, 2009 at 10:01 AM, Glen Jarvis <glen at glenjarvis.com>
> wrote:
> >>
> >>> (The only place where Java has Python beat is that it performs better.
> >>>  Thankfully, that's rarely an issue for me since I usually have to
> >>> worry a lot more about scalability than performance.)
> >>
> >> And that may, theoretically, change with the Unladen Swallow project.
> >> _______________________________________________
> >> Baypiggies mailing list
> >> Baypiggies at python.org
> >> To change your subscription options or unsubscribe:
> >> http://mail.python.org/mailman/listinfo/baypiggies
> >
> >
> > _______________________________________________
> > Baypiggies mailing list
> > Baypiggies at python.org
> > To change your subscription options or unsubscribe:
> > http://mail.python.org/mailman/listinfo/baypiggies
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20091028/34ce88a4/attachment.htm>

More information about the Baypiggies mailing list