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
#Antimicrobials are not always needed when you are feeling unwell.
Antibiotics should only be prescribed by healthcare professionals after an appropriate diagnostic test.
Be an #AntimicrobialResistance guardian.
#Antimicrobials are not always needed when you are feeling unwell.
Antibiotics should only be prescribed by healthcare professionals after an appropriate diagnostic test.
Be an #AntimicrobialResistance guardian
#Antimicrobials are not always needed when you are feeling unwell.
Antibiotics should only be prescribed by healthcare professionals after an appropriate diagnostic test.
Be an #AntimicrobialResistance guardian
#Antimicrobials are not always needed when you are feeling unwell.
Antibiotics should only be prescribed by healthcare professionals after an appropriate diagnostic test.
Be an #AntimicrobialResistance guardian
#Antimicrobials are vital in fighting infectious diseases across humans, animals, and plants.
However, their effectiveness is diminishing, leading to a growing and urgent crisis known as #AntimicrobialResistance.
Let’s promote the responsible use and work together to combat #AMR.
#Handwashing is a basic and effective tool against infections.
If we do not become sick, we would not need to use #antimicrobials.
Encourage your loved ones to practice frequent #handwashing with soap under running water.
Do your part to prevent #AntimicrobialResistance
#Antimicrobials are becoming less effective against common infections in animals & humans.
🚫 Do not self-medicate
✅ Visit a healthcare professional when sick
Everyone has a role to play to ensure #antimicrobials continue to work.
#AMR#WAAW2023
#AntimicrobialResistance is a global concern affecting everyone, everywhere, including users & non-users of #antimicrobials
Our National Action Plan for Antimicrobial Resistance incorporates a #OneHealth approach to contain #AMR in Nigeria
Read & share:
https://ncdc.gov.ng/themes/common/docs/protocols/77_1511368219.pdf
#AntimicrobialResistance is one of the top 10 health threats in the world.
Everyone everywhere, including users and non-users of #antimicrobials have a role to play to prevent #AMR.
#BeAntimicrobialAware
Every year, the National Antimicrobial Resistance Technical Working Group joins the global community to raise awareness of the dangers of misuse or overuse of #antimicrobials.
Fighting #AMR is a global endeavour that must be addressed through a #OneHealth approach as evident in this year's theme of #WAAW2023: ‘Preventing #AntimicrobialResistance together”
🔗Press Release
https://ncdc.gov.ng/news/504/nigeria-joins-the-global-community-to-commemorate-world-antimicrobial-awareness-week-%28waaw%29
Misuse or overuse of #antibiotics💊 & other #antimicrobials can reduce its effectiveness in treating common infections in animals & humans.
From 18th-24th November, we are joining the global health community to mark the annual #WorldAntimicrobialAwarenessWeek2022 .
#StayTuned
#AntimicrobialResistance is when medicines like #antimalarials, tetracycline, septrin, and amoxicillin no longer treat diseases they cured previously.
Everyone everywhere, including users and non-users of #antimicrobials has a role to play to prevent #AMR.
#BeAntimicrobialsAware