Python doesn't have opcode cacher?

怎甘沉沦 提交于 2019-12-10 11:41:07

问题


I'm currently using PHP. I plan to start using Django for some of my next project.

But I don't have any experience with Python. After some searching, I still can't find a Python opcode cacher.

(There are lots of opcode cacher for PHP: APC, eAccelerator, Xcache, ...)


回答1:


It's automatic in Python -- a compiled .pyc file will appear magically.




回答2:


Python doesn't need one the same way PHP needs it. Python doesn't throw the bytecode away after execution, it keeps it around (as .pyc files).




回答3:


It's built in: http://pyfaq.infogami.com/how-do-i-create-a-pyc-file

Python can compile to *.pyc files that effectively do the same thing.



来源:https://stackoverflow.com/questions/3468243/python-doesnt-have-opcode-cacher

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