性能:Python 3.x 与 Python 2.x [英] Performance: Python 3.x vs Python 2.x
本文介绍了性能:Python 3.x 与 Python 2.x的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
就性能问题而言,Python 3 与 Python 2.x 相比如何?
On a question of just performance, how does Python 3 compare to Python 2.x?
推荐答案
3.0 在官方基准测试中比 2.5 慢.来自 Python 3.0 的新功能":
3.0 is slower than 2.5 on official benchmarks. From "What’s New in Python 3.0":
3.0 的最终结果概括是 Python 3.0运行 pystone 基准测试大约 10%比 Python 2.5 慢.最有可能的最大的原因是去除小整数的特殊情况.有改进的空间,但它将在 3.0 发布后发生!
The net result of the 3.0 generalizations is that Python 3.0 runs the pystone benchmark around 10% slower than Python 2.5. Most likely the biggest cause is the removal of special-casing for small integers. There’s room for improvement, but it will happen after 3.0 is released!
这篇关于性能:Python 3.x 与 Python 2.x的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文