Why is IronPython faster than the Official Python Interpreter

Tristan Havelick picture Tristan Havelick · Feb 2, 2009 · Viewed 10.2k times · Source

According to this:

http://www.codeplex.com/IronPython/Wiki/View.aspx?title=IP20VsCPy25Perf&referringTitle=IronPython%20Performance

IronPython (Python for .Net) is faster than regular Python (cPython) on the same machine. Why is this? I would think compiled C code would always be faster than the equivalent CLI bytecode.

Answer

Serafina Brocious picture Serafina Brocious · Feb 2, 2009

Python code doesn't get compiled to C, Python itself is written in C and interprets Python bytecode. CIL gets compiled to machine code, which is why you see better performance when using IronPython.