寻找 Psyco 的良好替代品(Python->C 编译器)

发布于 2024-12-18 13:51:08 字数 1539 浏览 1 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

嘴硬脾气大 2024-12-25 13:51:08

您可以尝试使用 PyPy,它是 Python 中 Python 的实现。它是标准 CPython 实现的替代品,并且速度大幅提升。

从其网站:

速度:由于其即时编译器,Python 程序经常运行
在 PyPy 上更快。

内存使用:大型、占用内存的 Python 程序最终可能会比在 CPython 中占用更少的空间。

兼容性:PyPy 与现有的高度兼容
蟒蛇代码。它支持ctypes并且可以运行流行的python库
比如twisted和django。

You could try using PyPy, which is an implementation of Python in Python. It is a replacement for the standard CPython implementation and boasts large speed increases.

From its website:

Speed: thanks to its Just-in-Time compiler, Python programs often run
faster on PyPy.

Memory usage: large, memory-hungry Python programs might end up taking less space than they do in CPython.

Compatibility: PyPy is highly compatible with existing
python code. It supports ctypes and can run popular python libraries
like twisted and django.

知你几分 2024-12-25 13:51:08

我相信 PyPy 现在运行 django。 PyPy 是用于 python 代码的纯 python jit,在某些情况下可以提供显着的加速。但仅支持有限的一组已编译模块。

I believe that PyPy runs django now. PyPy is a pure-python jit for python code, and can provide dramatic speedups in some circumstances. Only a limited set of compiled modules are supported though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文