I could use some help making this Python code run faster using only Python code.

Python Maniac raychorn at hotmail.com
Sat Sep 22 06:55:01 CEST 2007

On Sep 21, 4:48 pm, "Matt McCredie" <mccre... at gmail.com> wrote:
> > It would be nice if Python could be made to automatically detect the
> > LC and string translation patterns used by the unoptimized Python code
> > and make them into optimized Python code on the fly at runtime.  I am
> > more than a little amazed nobody has chosen to build a JIT (Just In-
> > Time compiler) or cached-compiler into Python but maybe that sort of
> > thing is just not needed given the fact that Python code can be easily
> > optimized to run 30x faster.
> See PyPyhttp://codespeak.net/pypy/for a JIT comiler for python.
> Although it is in the research phase, but worth taking a look at.
> Matt

You need to check-out a project called Psyco (forerunner for pypy).

I was able to get almost 2x better performance by adding 3 lines of
code for Psyco.

See also: http://psyco.sourceforge.net/download.html

I am rather amazed !  Psyco was able to give much better performance
above and beyond the already optimized Python code without negatively
impacting performance during its analysis at runtime.

More information about the Python-list mailing list