news.volyx.in

Python 3.11 Delivers (twitter.com)

423 points by mariuz · 1361 days ago · 146 comments on HN

Article summary

The Python Package Index announced that Python 3.11 delivers, citing a significant drop in CPU usage after upgrading from 3.10 to 3.11. This improvement is attributed to the CPython team's efforts in enhancing performance. The upgrade resulted in nearly half the CPU usage for the web services powering PyPI. This change is expected to positively impact various Python-based applications and services.

Main themes

  • Python 3.11 performance
  • GIL removal challenges
  • Alternative parallelization methods
  • CPython data model
  • Library compatibility
  • Abstraction layers
  • Performance trade-offs

What commenters say

  • Removing the Global Interpreter Lock (GIL) in Python would be challenging due to its central role in the CPython data model and potential impact on existing libraries.
  • The GIL removal would likely break many OSS packages written with the C API that rely on the GIL for thread safety.
  • Some argue that making the GIL optional as a runtime flag could be a viable solution, while others believe it would not be sufficient.
  • Python's performance improvements, such as those in version 3.11, may be offset by the addition of new layers of abstraction in the future.
  • Alternative solutions like using multiple interpreters, each with its own GIL, or leveraging tools like Taichi for specific use cases, are being explored.
  • The demand for removing the GIL may not be high enough yet to warrant the significant effort required.
  • Some developers rely on workarounds like using multiple processes or threading for parallelization, which may not be ideal for all scenarios.