interpreter vs. compiled

castironpi castironpi at gmail.com
Wed Jul 23 18:38:56 CEST 2008


On Jul 22, 11:38 pm, Tim Roberts <t... at probo.com> wrote:
> castironpi <castiro... at gmail.com> wrote:
>
> >You're saying the VM can't compile code.  That makes sense, it's not a
> >compiler.
>
> I wouldn't say "can't".  The current CPython VM does not compile code.  It
> COULD.  The C#/.NET VM does.  IronPython, for example, is an implementation
> of Python that uses .NET.  In that case, the code *IS* JIT compiled to
> assembly when the program starts.
>
> >Do I understand correctly that JIT does compile to native
> >code in some cases?
>
> VMs that use JIT do, yes.
>
> >But that's not the only thing that stops python
> >from precompiling to assembly directly.  GNU doesn't come with
> >Python.
>
> Do you mean Linux?
>
> >What sorts of minimal information would be necessary to take
> >from the GNU libs for the user's specific processor, (the one they're
> >downloading their version of Python for), to move Python to the
> >further step of outputting the machine code?
>
> I don't know why you think GNU has anything to do with this.  There's
> nothing that prevents the Python run-time from JIT compiling the code.
> IronPython does this.  CPython does not.  It's an implementation decision.
> --
> Tim Roberts, t... at probo.com
> Providenza & Boekelheide, Inc.

Compiling a program is different than running it.  A JIT compiler is a
kind of compiler and it makes a compilation step.  I am saying that
Python is not a compiler and in order to implement JIT, it would have
to change that fact.

> of Python that uses .NET.  In that case, the code *IS* JIT compiled to
> assembly when the program starts.

But still not the user's code, only the interpreter, which is running
in assembly already anyway in CPython.



More information about the Python-list mailing list