7.09.2025 состоялся релизPithon 3.14!
На фоне хайпа про NoGIL всё позабыли про другие фичи. Особенно про Multiple Interpreters, который обещает изоляцию процессов но с эффективностью потоков! На сколько действительно это будет эффективно мы узнаем позже, потому что сейчас это лишь первый релиз с ограничениями и недоработками.
Но что там про NoGIL? Теперь этот режим не экспериментальный, а официально поддерживаемый, но опциональный.
Чтобы запустить без GIL нужна специальная сборка. И перед стартом нужно объявить переменную PYTHON_GIL=0
Для вас я собрал готовый репозиторий где достаточно запустить скрпит, который всё сделает:
▫️ соберет релизный Python 3.14 в новый Docker-образ
▫️ запустит тесты в контейнере (GIL, NoGIL, MultiInterpreter)
▫️ распечатает результаты
Тест очень простой, усложняйте сами)
Вот какие результаты у меня:
=== Running ThreadPoolExecutor GIL ON
TOTAL TIME: 45.48 seconds
=== Running ThreadPoolExecutor GIL OFF
TOTAL TIME: 6.14 seconds
=== Running basic Thread GIL ON
TOTAL TIME: 45.54 seconds
=== Running basic Thread GIL OFF
TOTAL TIME: 4.74 seconds
=== Running with Multi Interpreter
TOTAL TIME: 18.30 seconds
Если сравнивать GIL и NoGIL, то на мои 32 ядра прирост х7-x10 (почему не х32? 🤷). При этом нам обещают что скорости будут расти с новыми релизами.
Режим без GIL похож (визуально) на async, тоже параллельно, тоже не по порядку. Но это не IO! и от того некоторый диссонанс в голове 😵💫, нас учили не так!
Интересно, что чистый Thread работает быстрей чем ThreadPoolExecutor без GIL.
Ну и где-то плачет один адепт мульти-интерпретаторов😭 Теперь нужно искать где они могут пригодиться с такой-то скоростью. Скорее всего своя область применения найдется.
Отдельно я затестил память и вот что вышло на 32 потока:
ThreadPoolExecutor GIL ON
305.228 MB
ThreadPoolExecutor GIL OFF
500.176 MB
basic Thread GIL ON
90.668 MB
basic Thread GIL OFF
472.444 MB
with Multi Interpreter
1267.788 MB
Пока не знаю как к этому относиться)
В целом - радует направление развития!
#release
📣COMING UP
Join our Head of Health Emergency Preparedness, Dr Biodun Ogunniyi as he gives update on #Cholera response in Nigeria.
Tune in LIVE on NTA to join the conversation
📡DSTV: CH 251
📡GOTV: CH 114
🕥 9:00 pm
As of 29th September, over 10,000 suspected cases of #cholera have been recorded from the 36 States + FCT.
The ongoing cholera outbreak has been worsened by limited access to clean water, open defecation, & poor hygiene practices in affected communities.
🔗Download the situation report
https://ncdc.gov.ng/diseases/sitreps/?cat=7&name=An%20update%20of%20Cholera%20outbreak%20in%20Nigeria
In reporting week 32, the number of suspected cases of #cholera increased to 121 cases.
Our weekly situation report provides an update on the current #cholera epidemiological situation in Nigeria and our response activities.
🔗 Download via:
https://ncdc.gov.ng/diseases/sitreps/?cat=7&name=An%20update%20of%20Cholera%20outbreak%20in%20Nigeria
Our weekly #cholera situation report for weeks 28 and 29 has been uploaded.
The reports provide an update on the current #cholera epidemiological situation in Nigeria and our response activities.
🔗 Download via:
https://ncdc.gov.ng/diseases/sitreps/?cat=7&name=An%20update%20of%20Cholera%20outbreak%20in%20Nigeria
Your actions, no matter how small can limit the risk of #cholera infection.
🚫Do not defecate in open areas
🧤Clear your drainages
✅Only drink water from safe sources
✅Dispose of refuse properly in waste disposal sites
Public health advisory⬇️
🔗https://ncdc.gov.ng/news/513/stop-cholera%3A-public-health-advisory
Our weekly #cholera situation report for week 27 has been uploaded.
The report provides an update on the current #cholera epidemiological situation in Nigeria and our response activities.
🔗 Download via:
https://ncdc.gov.ng/diseases/sitreps/?cat=7&name=An%20update%20of%20Cholera%20outbreak%20in%20Nigeria
Our #cholera situation reports are now weekly.
The reports provide an update on the #cholera epidemiological situation in Nigeria and our response activities.
🔗 Download via:
https://ncdc.gov.ng/diseases/sitreps/?cat=7&name=An%20update%20of%20Cholera%20outbreak%20in%20Nigeria
The bacteria, Vibrio cholerae, that causes #cholera is commonly found in contaminated water and food.
Protect yourself.
Read our public health advisory on measures to take to prevent yourself from getting infected. ⬇️
🔗
https://ncdc.gov.ng/news/513/stop-cholera%3A-public-health-advisory
📣ICYMI
The Incident Manager of our National #Cholera Technical Working Group, Mr Sebastian Yennan, was live on Arise TV to discuss the ongoing #cholera outbreak.
🔗 Catch up and share via
https://youtu.be/rVHP5kRU4bw?si=aIMQiFD9Uo3qjCND
#Cholera Situation Report
Our monthly Cholera Situation Report for May 2024 has been published on our website.
🔗You can download, read and share via
https://ncdc.gov.ng/diseases/sitreps/?cat=7&name=An%20update%20of%20Cholera%20outbreak%20in%20Nigeria
Severe cases of #cholera can cause death within hours due to dehydration.
Recognise the signs and symptoms to ensure you seek early healthcare and treatment if suspected.
Unwashed hands, untreated water, and uncovered food are some of the ways #Cholera germs are spread.
Personal and environmental hygiene remains one of the best ways to STOP #Cholera.
Watch this little boy's story on cholera:
https://www.youtube.com/watch?v=jG1VNSCsP5Q