Python compilers?

Leif K-Brooks eurleif at ecritters.biz
Tue May 18 00:22:03 EDT 2004


Svein Ove Aas wrote:
> Is anyone working on a python-to-native compiler?
> I'd be interested in taking a look.

What are you trying to achieve?

If it's faster code execution, the primary slowdown with a very 
high-level language like Python is caused by high-level data structures 
(introspection, everything being an object, etc.), not the code itself. 
A native compiler would still have to use high-level data structures to 
work with all Python code, so the speed increase wouldn't be very much.

If it's ease of distribution you're looking for, I think distutils can 
make standalone programs on Windows, and most Linux distros have Python 
installed by default.

If you just think a compiler would be cool (or would like to see how it 
would be done), check out Psyco, Pyrex, and probably some other 
projects. Pyrex even combats the speed issue by allowing native C types 
to be used in addition to Python high-level types.



More information about the Python-list mailing list