Python compilation ??
John Nagle
nagle at animats.com
Tue Jul 3 01:03:21 EDT 2007
Evan Klitzke wrote:
> On 7/2/07, Cathy Murphy <cathy at nachofoto.com> wrote:
>
>> Is python a compiler language or interpreted language. If it is
>> interpreter
>> , then why do we have to compile it?
>
>
> It's an interpreted language. It is compiled into bytecode (not
> machine code) the first time a script is run to speed up subsequent
> executions of a script.
CPython compiles to an intermediate form, rather than
all the way to machine code, and executes the intermediate form,
which is basically a tree, with an interpreter written in C.
ShedSkin Python compiles to C++, then all the way to machine code.
Some CPython features have to be disallowed, but there's a huge
performance gain.
Jython compiles to Java byte code, which is then compiled to
machine code by a just-in-time compiler.
Iron Python compiles to Microsoft's byte code as used by their
".NET" common language runtime. This is then compiled to machine
code by a just-in-time compiler.
John Nagle
More information about the Python-list
mailing list