news.volyx.in

Python 3.11 vs 3.10 performance (github.com)

715 points by hyperbovine · 1528 days ago · 444 comments on HN

Article summary

The article discusses the performance improvements in Python 3.11 compared to 3.10. The comments reveal that the improvements are a result of the Python core committers prioritizing speed over clean implementations. However, the article itself is not available, and the discussion is based on the comments. The Python community is debating the trade-offs between performance, concurrency, and ease of use.

Main themes

  • Python performance
  • Concurrency vs Parallelism
  • Asyncio limitations
  • GIL and performance
  • Low-hanging fruits in optimization
  • Concurrency models
  • Design choices and trade-offs
  • Performance limitations and workarounds

What commenters say

  • Python's performance improvements are a result of prioritizing speed over clean implementations.
  • Asyncio is a flawed approach to concurrency due to its limitations and complexity.
  • The Global Interpreter Lock (GIL) prevents true parallelism in Python, making concurrency a challenge.
  • Asyncio is a well-designed library that provides great interfaces for managing event loops and IO, but has limitations.
  • The need for low-hanging fruits in performance optimization is debated, with some arguing that they are easy wins and others seeing them as unnecessary.
  • Concurrency and parallelism are often confused, with some arguing that Python's concurrency model is flawed.
  • The choice between asyncio and other concurrency models, such as multiprocessing or green threads, depends on the specific use case and requirements.
  • Python's performance limitations are a result of design choices and the presence of the GIL, which may not be worth optimizing due to the availability of C extensions.