Lambda the Ultimate

inactiveTopic Psyco, the Python Specializing Compiler
started 11/22/2001; 11:15:40 AM - last post 9/14/2002; 2:03:33 AM
Ehud Lamm - Psyco, the Python Specializing Compiler  blueArrow
11/22/2001; 11:15:40 AM (reads: 1994, responses: 2)
Psyco, the Python Specializing Compiler
(via Daily Python-URL)

The aim of the Psyco project is to show that it is possible to execute Python code at speeds approaching that of fully compiled languages. The current prototype operates on i386-compatible processors. Preliminary results show potential speed-ups of a factor 10 to 100, which means that we can hope execution speeds closer to fully optimized C than to traditional Python.

Psyco is an on-line partial evaluator for the Python language. It is based on run-time code generation.


Posted to implementation by Ehud Lamm on 11/22/01; 11:16:03 AM

Frank Atanassow - Re: Psyco, the Python Specializing Compiler  blueArrow
11/22/2001; 5:03:44 PM (reads: 856, responses: 0)
This project is pretty interesting. The underlying idea has a nice symmetry: dynamic compilation for dynamically typed languages; static compilation for statically typed languages. (OK, maybe I'm reading too much into it, but that's how I see it.) However, I have a feeling that the greater part of programs written in dynamic languages is still more or less statically typeable, so you are still taking a performance hit.

Also, it seems like in super-dynamic languages like Python, where you can generate and eval code dynamically with metaprogramming facilities, that a careful compiler would have to be conservative about code generation and caching to avoid generating reams (indeed, possibly an unbounded amount) of code which will/can never be executed.

But I'm interested to see the results.

Actually, this is the most interesting thing I have seen so far in the Python world. ;)

Ehud Lamm - Re: Psyco, the Python Specializing Compiler  blueArrow
9/14/2002; 2:03:33 AM (reads: 575, responses: 0)
Seems like they are looking for people willing to test Psyco on their own Python code.