Does PY2EXE Compile a Python Code to run Faster?

前端 未结 2 1884
爱一瞬间的悲伤
爱一瞬间的悲伤 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.

提交回复
热议问题