Psyco Specializing Compiler

Rigo Armin arigo at belgacom.net
Wed Oct 10 18:59:23 EDT 2001


Hello everybody,

"Psyco", the Python Specializing Compiler I introduced some time ago on the
python-dev mailing list, is beginning to work. Its goal is to accelerate
execution of any Python program by dynamically compiling several
"specialized" versions of your code directly in machine code. For more info
see

   http://homepages.ulb.ac.be/~arigo/psyco/

Currently works on very simple examples only, but quite well: with an
acceleration factor of 100, including the compilation time! I expect a
factor of about 10 in compiling real code.

Python is known to be "impossible to compile". Psyco shows that it is only
half the story. True, Psyco does not statically compile your code, so don't
expect to turn a .py file into a stand-alone .exe file. This still requires
the full interpreter. But Python or any other interpreted language can
theoretically be run as fast as fully optimized C. If you don't believe it
wait for a full-featured Psyco. It won't be as fast as C but it will
probably be faster than you believed was possible :-)

Armin Rigo





More information about the Python-list mailing list