Python 3.14 采用新型解释器,速度提高-3%~30%
Python 官方文档( docs.python.org/3.14/whatsnew/3.14.html#a-new-type-of-interpreter) :
A new type of interpreter based on tail calls has been added to CPython. For certain newer compilers, this interpreter provides significantly better performance. Preliminary numbers on our machines suggest anywhere from -3% to 30% faster Python code, and a geometric mean of 9-15% faster on pyperformance depending on platform and architecture. The baseline is Python 3.14 built with Clang 19 without this new interpreter.
其实我很想知道,这种性能测试的结果到底准不准?熟悉这方面的大佬来聊聊。
盲猜一个不准
github.com/faster-cpython/benchmarking-public 可以看下他们跑的基准测试都跑了哪些场景
准肯定是准的,就是真需要这个性能的早都转 Julia rust cpp 了
提高-3%?
go 1.24 使用新型 runtime ,速度提高 2%~3%
我怎么感觉是 python 之前的性能实在是太差,所以显得进步空间贼大。
就以 100 为单位,提升 5%-30%也就是 105 ~ 130 。但是 C++可能在 1000 。
没法相比其他语言,只能对比自己。
3.11 的时候也说有提升,给出的性能测试结果也不错,结果落到我们的业务场景(主要是大量数据的遍历和计算,有一些环节没法拆到 C++)中速度还变慢了...
原文中是换行的连词符号
我挺喜欢 python 的,但是 py 连 nodejs 的性能都比不过。。。
fastpython 项目多少年了,这提升龟速翻五倍的目标是不是遥遥无期了。
什么叫连,人 v8 引擎一直是高性能的标杆吧。
#9
原文就是 from -3% to 30% faster 。
连词符号是在 interpreter 这个单词,而且是 css hyphens ,复制文本出来是没有连词符的。
这是常见的无感提速问题了,某些场景下就是会慢... 算是一种 trade off
都用 python 了,还在乎性能吗?真需要性能,拿 c 、rust 写底层,python 调用不就行了?胶水语言就应该干胶水语言干的活
意思就是有的代码运行可能会变慢一点。
太厉害了 python ,很难说是不是之前太慢显得提升很多。
附 3.11 的更新日志: docs.python.org/3.11/whatsnew/3.11.html#faster-cpython
CPython 3.11 is an average of 25% faster than CPython 3.10 as measured with the pyperformance benchmark suite, when compiled with GCC on Ubuntu Linux. Depending on your workload, the overall speedup could be 10-60%.
300%也还是慢...
因为从 2 到 3 , 就慢了
现在只是恢复到 2 的水准,哈哈
你说的对,是我想当然了,很抱歉。感谢指正。
不如 3500 倍快的 python 杀手 Mojo Lang🐶
抱歉,我之前给你的回复是错误的,请看下面 13 楼 tsanie 的解释
都用 python 了,还想效率,就算提升 100%也没什么用
作为程序员,能 hold 得住开源本地化的就尽量用开源本地化(且免费)的吧,闭源或云端必有出事锁死的一天。 所以推荐: AFFiNE github.com/toeveryt…
有时候不在家想有个远程桌面用,这样在公共电脑上不用装软件登录啥的。 用途就是看看微信,WPS 编辑文档,访问访问网页,用什么样的系统可以最小化资源?毕竟虚拟机要 24 小时开启…
看招聘信息的话,springboot 无处不在,你喜欢它吗?还是有其他的选项?有什么原因/理由? Spring Boot 行业标准了,也没有其他更好的替代,姑且用着吧 …