[pypy-dev] Compiler Benchmarks

logistix logistix at zworg.com
Mon Feb 3 23:58:32 CET 2003


holger krekel <hpk at trillke.net> wrote:
> 
> [Oren Tirosh Sun, Feb 02, 2003 at 01:26:57PM -0500]
> > On Sat, Feb 01, 2003 at 07:34:44PM -0800, logistix wrote:
> > > I compiled the contents of the Lib directory (but not 
> > > subdirectories) with the builtin compile, the compiler module's 
> > > compile, and a hacked compiler module that used my parser on a 
> > > 866Mhz machine running WinXP.
> > > 
> > > The builtin compile took an average of 2.9 seconds.
> > > 
> > > The compiler module took an average of 105.3 seconds, or 36.3 
> > > times as long.  The compiler module uses CPython's parser, but 
> > > other than that it's in pure Python.
> > > 
> > > The hacked compiler module took an average of 177.2 seconds or 
> > > 61.1 times as long.  It has a pure Python module, but relies on 
> > > tokeize which leaves re as the only C dependancy left.
> > 
> > To get a (very rough) estimate of the performance we can expect from
> > a PyPython compiler it would be interesting to know how fast this code
> > runs with psyco.
> 
> I agree that this would be interesting even though the PyPy-compiler 
> might run on a quite different PSYCO.  I can imagine modifying the 
> compiler to implement the same restrictions that we might set on the 
> PyPy-Interpreter. I can't wait to begin hacking on this.
> 
> logistix, is your parser/compiler code available anywhere?
> 
>     holger
> 

I just wrote the parser, the compiler code is already in the base
distribution.

There were a few bugs that turned up in Python2.2, so that's why I
didn't run psyco benchmarks.  Just using the standard compiler module
in 2.2 with psyco didn't yield much of an improvement (108 seconds vs
115).

Here's the code if you're interested.  As I mentioned, you'll need at
least 2.3a1.  The instructions to tie it into the compiler modules are
in the docstring:

http://members.bellatlantic.net/~olsongt/python/pparser.py

-logistix

P.S. If anyone wants to patch this in and run Tools/Compiler/Regrtest.py
against it, results would be appreciated.


More information about the Pypy-dev mailing list