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

孤者浪人 提交于 2019-12-05 04:51:24

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.

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)

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