interpreter vs. compiled

Tim Roberts timr at
Tue Jul 29 08:46:56 CEST 2008

castironpi <castironpi at> wrote:
>In CPython yes.  In IronPython yes:  the parts that are compiled into
>machine code are the interpreter, *not user's code*. 

WRONG!  You are WRONG.  At "compile" time, the Python code is compiled to
an intermediate language.  At "run" time, the intermediate language (which
is still the user's code, just in another representation) is compiled into
machine language.  It is the user's program, not the interpreter.

It's the exact same process that occurs in a C compiler.  Most C compilers
translate the C program to an intermediate form before finally converting
it to machine language.  The only difference is that, in a C compiler, both
steps occur within the compiler.  In IronPython, the two steps are
separated in time.  There is no other difference.

>Without that
>step, the interpreter would be running on an interpreter, but that
>doesn't get the user's statement 'a= b+ 1' into registers-- it gets
>'push, push, add, pop' into registers.

You have a fundamental misunderstanding of the compilation process.
Tim Roberts, timr at
Providenza & Boekelheide, Inc.

More information about the Python-list mailing list