this post was submitted on 29 Jul 2023
60 points (96.9% liked)

Python

6343 readers
15 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS
 

It’s clear that the overall sentiment is positive, both for the general idea and for PEP 703 specifically. The Steering Council is also largely positive on both. We intend to accept PEP 703, although we’re still working on the acceptance details.

Long-term (probably 5+ years), the no-GIL build should be the only build. We do not want to create a permanent split between with-GIL and no-GIL builds (and extension modules).

Short term, we add the no-GIL build as an experimental build mode, presumably in 3.13 (if it slips to 3.14, that is not a problem

top 5 comments
sorted by: hot top controversial new old
[–] [email protected] 13 points 1 year ago (1 children)

Pretty exciting... I just hope they are able to effectively avoid another long transition ala python2 -> python3.

[–] [email protected] 5 points 1 year ago

Guido once said on a podcast that if they ever ended up doing python4, removing the GIL might be one of the reason for that move. He wanted to avoid the issues we got with python2 - > 3 though. I wouldn't worry too much.

[–] itsathursday 8 points 1 year ago (1 children)

So legacy threaded code will now get a performance boost for “free”?

[–] [email protected] 12 points 1 year ago (1 children)

It will depend on the nature of how the threaded code is structured (how much is sequential, how much is paralle, Amdahl's law, etc), but it should at least be more effective at scaling up and taking advantage of multiple cores.

That said, the change would come at a cost to single threaded code. From the PEP 703:

The changes proposed in the PEP will increase execution overhead for --disable-gil builds compared to Python builds with the GIL. In other words, it will have slower single-threaded performance. There are some possible optimizations to reduce execution overhead, especially for --disable-gil builds that only use a single thread. These may be worthwhile if a longer term goal is to have a single build mode, but the choice of optimizations and their trade-offs remain an open issue.

[–] [email protected] 2 points 1 year ago

imho its a cost we should pay. CPU’s are getting more cores not faster ones.