一项对Python 3.15(rc3版本)的性能基准测试显示,该版本相比Python 3.14的性能改进有限1。测试采用递归计算斐波那契数列和冒泡排序两个程序,分别在单线程和4线程并行模式下对Python 3.10至3.15、PyPy、Node.js和Rust等多个版本进行了评估1。
在JIT编译器方面,Python 3.15表现显著改善,斐波那契递归测试中单线程性能提升约1.20倍,冒泡排序单线程性能提升约1.28倍1。自由线程版本在多线程场景下的优势更为明显,其在多线程斐波那契测试中相比标准版本性能提升约4.5倍1。与此同时,PyPy 3.12在单线程斐波那契测试中相比Python 3.15快约5.5倍1。历史数据表明,Python 3.11和3.14是历代版本中性能改进最显著的两个版本1。
A performance benchmark of Python 3.15 (release candidate 3) has revealed modest improvements compared to Python 3.14, with the exception of specialized compiler features 1. The testing compared multiple Python versions ranging from 3.10 through 3.15, alongside alternative implementations including PyPy, Node.js, and Rust 1.
The evaluation employed two test programs: a recursive Fibonacci calculation and a bubble sort operation on 10,000 random numbers, each run in both single-threaded and 4-threaded parallel modes 1. Python 3.15's just-in-time (JIT) compiler demonstrated the most significant performance improvements, achieving a 1.20x speedup on the Fibonacci test and a 1.28x speedup on the sorting test compared to the standard interpreter 1. The free-threading variant of Python 3.15 delivered approximately 4.5x performance gains in multi-threaded Fibonacci testing relative to the standard version 1. By contrast, PyPy 3.12 outpaced Python 3.15 by a factor of 5.5x on single-threaded Fibonacci operations 1.
Historically, Python 3.11 and 3.14 have been the versions with the most substantial performance enhancements 1. The benchmark indicates that aside from JIT compilation capabilities, Python 3.15 offers limited performance benefits over its immediate predecessor 1.
评论
还没有评论,欢迎留下第一条。