pythonperformance

is compiled python code as fast as C++ code?


if i write a program in Python and then compile it using any of these compilers:

Gordon McMillan’s installer (cross-platform)

Thomas Heller’s py2exe

(Windows) Anthony Tuininga’s cx_Freeze (cross-platform)

is it as fast as code written in a compiled language?


Solution

  • These tools are not compilers, they're just packaging python code into an easier to launch application. If you want something more like compilation try http://pypy.org (JIT for python) or http://code.google.com/p/shedskin (which translates Python to C++).