Does PY2EXE Compile a Python Code to run Faster?

前端 未结 2 1911
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-21 14:31

I really like the PY2EXE module, it really helps me share scripts with other co-workers that are super easy for them to use.

My question is: when the PY2EXE module compi

相关标签:
2条回答
  • 2021-01-21 14:56

    py2exe just bundles the Python interpreter and all the needed libraries into the executable and a few library files. When you run the executable, it uses the bundled interpreter to run your script.

    Since it doesn't actually generate native code, the speed of execution should be about the same, possibly slower because of the overhead of everything being packaged up.

    0 讨论(0)
  • 2021-01-21 14:56

    Partly, it bundles the python environment with the 'precompiled' pyc files. These are already parsed into python byte code but they aren't native speed executables

    0 讨论(0)
提交回复
热议问题