Yui
Yui

Reputation: 103

Functionality differences of CPython and IronPython

So from what I understand IronPython is compiled to Bytecode which is compiled to machinecode through the .net CLR, whereas CPython is compiled to Bytecode and interpreted with the PVM. Is this true? What exactly is the CLR? Is it also a Virtual Machine? Does that mean Iron Python is faster? I hope someone can explain this to me.

Upvotes: 1

Views: 655

Answers (1)

Janne Karila
Janne Karila

Reputation: 25207

IronPython compiles to Microsoft intermediate language (MSIL), which is analogous to the bytecode produced and interpreted by CPython. The common language runtime (CLR) is a virtual machine that executes MSIL. It has a just-in-time (JIT) compiler that translates the MSIL into native code.

CPython has no JIT. The IronPython wiki has this to say on perfomance:

Performance is comparable to CPython - much faster for some things (where it can take advantage of the JIT compiler in the underlying platform), but slower for other things (particularly the built in container types where a lot of work has been done on optimising the CPython types).

Upvotes: 4

Related Questions