I use Python 2.7, Windows 7 64-bit — alternatives to Psyco?

女生的网名这么多〃 提交于 2019-12-07 01:32:29

问题


Apparently Psyco doesn't work for Python 2.7.

Are there other alternatives?


回答1:


Today's state of the art in Python compilation is PyPy. I don't have any information about whether it will work for you on your target platform.




回答2:


I think there's no real alternative only using Python as psyco does (Pypy which is increasingly becoming the 'only Python' alternative doesn't support extension modules, so, right now, many of projects can't migrate, but if yours isn't one of those, it can be a nice approach)

If you can't use Pypy right now, after doing a profile session and confirming things can't be speed up anymore in plain Python, the path is usually one of:

  1. c/c++ extension module (my personal favorite -- works on any platform and using boost::python makes this process pretty simple and straightforward, although if you don't know c/c++, this may not be so easy).

  2. Cython (you usually have to change your program a bit so that it becomes fast in Cython, and the changes aren't really python code, but an extension of it)

  3. Shed Skin (if it can cope with your program)



来源:https://stackoverflow.com/questions/8599162/i-use-python-2-7-windows-7-64-bit-alternatives-to-psyco

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!