Compiling
Rocco Moretti
roccomoretti at hotpop.com
Fri Feb 3 12:16:18 EST 2006
Simon Faulkner wrote:
> Pardon me if this has been done to death but I can't find a simple
> explanation.
>
> I love Python for it's ease and speed of development especially for the
> "Programming Challenged" like me but why hasn't someone written a
> compiler for Python?
>
> I guess it's not that simple eh?
The "simple" explanation for the lack of a Python compiler is the
massive dynamisism (sp) in Python - since you can change practically
everything at any time, in order to compile a generic python program,
you have to effectively include the entire interpreter. It's been done
before (Python2C was the name, I think), but there wasn't much of a
speed-up vs. CPython, and it hasn't been updated to work with recent
versions of Python.
Recently there has been work on JIT type dynamic compilation techniques,
and static compilation of a reduced Python subset. If you want to know
more, look up the PyPy project. http://www.codespeak.net/pypy
More information about the Python-list
mailing list