news.volyx.in

Python 3.14 is here. How fast is it? (blog.miguelgrinberg.com)

746 points by pjmlp · 290 days ago · 557 comments on HN

Article summary

The article discusses the performance of Python 3.14, the latest version of the Python programming language, and compares it to previous versions and other languages like Node.js and Rust. The author ran benchmarks on two laptops with different CPUs and operating systems, testing single-threaded and multi-threaded performance. The results show that Python 3.14 is the fastest of all the CPythons, with significant improvements over version 3.13. The article also explores the potential benefits of using the Just-In-Time (JIT) and free-threading interpreters in Python 3.14.

Main themes

  • Python performance
  • Language benchmarks
  • Interpreter optimization
  • Multi-threading
  • JIT compilation
  • Language choice

What commenters say

  • Python's performance is not a major concern for most developers, as it is often used for tasks where speed is not critical.
  • The focus on improving Python's performance is unnecessary, as most applications do not require high performance and can be optimized using other means.
  • Python's sluggishness can be a significant issue in certain applications, such as high-performance computing and data science, where even small performance improvements can be valuable.
  • Other languages, such as Rust and Julia, offer better performance and may be more suitable for applications where speed is critical.
  • The use of JIT compilation and other optimization techniques can significantly improve Python's performance, but may not be sufficient to make it competitive with faster languages.
  • The choice of language depends on the specific needs of the project, and Python's ease of use and versatility make it a popular choice despite its performance limitations.
  • Rewriting Python code in a faster language can be a viable option for improving performance, but may not always be necessary or practical.
  • The development of languages like Julia, which aims to combine the ease of use of Python with the performance of languages like C++, may change the landscape of programming language choice in the future.