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
This mosquito thought it had found the perfect breeding grounds to raise an army… but every step was BLOCKed 🚫🦟
🔴 𝗕reak up hardened soil
🔴 𝗟ift and empty flowerpot plates
🔴 𝗢verturn pails and wipe their rims
🔴 𝗖hange water in vases
🔴 𝗞eep roof gutters clear and place BTI insecticide
Let’s #BLOCKDengue together 👉go.gov.sg/dengue-checklist
Doing your last round of spring cleaning before the Lunar New Year? Don’t forget to remove all stagnant water. Let’s bring in good health and fortune, not mosquitoes. 🚫🦟
Check out more dengue prevention tips at go.gov.sg/dengue-checklist#BLOCKdengue
Dengue and Zika, transmitted by Aedes mosquitoes, can cause serious health issues. Although rare, Zika virus infection can cause microcephaly in unborn babies of pregnant women. #BLOCKdengue and Zika weekly. Protect yourself with "S-A-W": go.gov.sg/dengue-zika
Out of sight, out of mind? Make sure you don’t leave your home’s roof gutters unattended.
If it gets clogged with fallen leaves, the accumulated water may become the perfect breeding ground for Aedes mosquitoes.
So, make sure to keep your roof gutters clear and place BTI insecticide. Let’s continue to B-L-O-C-K dengue and Zika at least once a week.
✅ Break up hardened soil
✅ Lift and empty flowerpot plates
✅ Overturn pails and wipe their rims
✅ Change water in vases
✅ Keep roof gutters clear and place BTI insecticide
Part of the ASEAN Dengue Day series to raise awareness on dengue prevention, check out our earlier posts too! #BLOCKDengue
Love keeping flowers around to brighten up your home? Don’t forget to change the water in flower vases every other day, so that they don’t become mosquito breeding habitats.
Let’s continue to B-L-O-C-K dengue and Zika at least once a week.
✅ Break up hardened soil
✅ Lift and empty flowerpot plates
✅ Overturn pails and wipe their rims
✅ Change water in vases
✅ Keep roof gutters clear and place BTI insecticide
#BLOCKDengue
Pretty sure that your pails are free from stagnated water? But you’ll never know when water might drip and accumulate.
Overturn pails and wipe their rims to be doubly sure!
Let’s continue to B-L-O-C-K dengue and Zika at least once a week.
✅ Break up hardened soil
✅ Lift and empty flowerpot plates
✅ Overturn pails and wipe their rims
✅ Change water in vases
✅ Keep roof gutters clear and place BTI insecticide
#BLOCKDengue
Excess water accumulated in flowerpot plates is the perfect breeding ground for the Aedes mosquitoes. So, don’t forget to lift and empty flowerpot plates every other day.
Let’s continue to B-L-O-C-K dengue and Zika at least once a week.
✅ Break up hardened soil
✅ Lift and empty flowerpot plates
✅ Overturn pails and wipe their rims
✅ Change water in vases
✅ Keep roof gutters clear and place BTI insecticide
#BLOCKDengue
It’s ASEAN Dengue Day! Observed every 15 Jun, it raises awareness on ways to prevent dengue.
Let’s continue to B-L-O-C-K dengue and Zika at least once a week. Learn more about dengue prevention here: go.gov.sg/mozzieproof#BLOCKDengue
‘Little but lethal’, the small female Aedes aegypti mosquito transmits the Dengue virus that can be deadly. Launched today, NEA’s National Dengue Prevention Campaign 2023 aims to rally the community to take immediate action to reduce the continued high number of dengue cases.
All of us need to do our part to #BLOCKdengue, and those residing in dengue cluster areas should carry out the ‘S-A-W’ actions to protect themselves and their loved ones. More at https://go.gov.sg/dengue-campaign-launch-mar2023
⚠️ Dengue alert! Set up alerts on the myENV app to find out if the places you live and work in, or frequent for leisure activities, have a higher dengue risk. #BLOCKDengue
#SGDengueUpdate 211 new dengue cases and 41 active dengue clusters were reported in the week ending 15 Jul 2023.
Let’s continue to actively #BLOCKDengue: https://go.gov.sg/mozzieproof
#SGDengueUpdate 235 new dengue cases and 44 active dengue clusters were reported in the week ending 8 Jul 2023. No new Zika cases were reported.
Let’s continue to actively #BLOCKDengue: https://go.gov.sg/mozzieproof