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
A female Aedes mosquito gets infected with the Dengue virus when it bites a person infected with dengue. It then transmits dengue to other healthy individuals it goes on to bite.
Help to break the dengue transmission cycle!
✅ Everyone should use insect repellent and carry out other S-A-W actions to protect themselves from being bitten by mosquitoes.
✅ Those diagnosed with or suspected to be infected with dengue are also advised to avoid further mosquito bites, to prevent passing on the Dengue virus to mosquitoes and other people in their neighbourhoods.
S-A-W:
✅ Spray insecticide in dark corners around the house
✅ Apply insect repellent regularly
✅ Wear long-sleeve tops and long pants
📱 Download the myENV app to receive alerts on high Aedes mosquito populations near you, or visit go.gov.sg/dengue-high-risk
#DenguePrevention
Heading out for holiday adventures? Before you dash, don’t give the mozzies any room to stay!
Follow the B-L-O-C-K steps and mozzie-proof your home before you roam:
✅ 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
Let’s make this holiday season not only merry but also mindful.
#BLOCKDengue#DenguePrevention
Going on your festive holiday escapade? 🏖
Give the mozzies no room to stay! Follow the B-L-O-C-K steps and mozzie-proof your home before you roam:
✅ 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
Together, we can keep dengue at bay. Learn more: https://go.gov.sg/mozzieproof
#BLOCKDengue#DenguePrevention
#SGDengueUpdate The number of active dengue clusters reported continues to remain high, with 64 active clusters reported as of 28 Dec. 198 dengue cases were reported in the week ending 26 Dec, and the cumulative number of dengue cases for this year stands at more than 35,100.
Let’s keep up our #DenguePrevention efforts and continue doing the #MozzieWipeout at least once a week. Find out what else you can do to protect yourself and your family at go.gov.sg/mozzieproof
#SGDengueUpdate As of 17 Dec 2020, there have been 34,844 reported dengue cases this year, with 228 cases reported last week. While NEA has closed about 98% of the dengue clusters notified since the beginning of 2020, there are still over 230 residential areas with high Aedes aegypti mosquito population currently.
So let’s stay vigilant and keep up our #DenguePrevention efforts. If you’re planning to go for a staycation, don’t forget to do the #MozzieWipeout first! Learn more: go.gov.sg/mozzieproof
🦟They’re small, they’re pesky, and they’re definitely not welcome! Mosquitoes love stagnant water - don’t let them crash the party.
It’s time for a Real-World Quest! Carry out the #BLOCKdengue steps at least once a week and mozzie-proof your home:
✅ 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
#DenguePrevention#Minecraft
Don't let your home become the Upside Down for mozzies! 🦟
The #BLOCKdengue steps are your weekly defence against these tiny monsters. Do these 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 add BTI insecticide
#DenguePrevention#StrangerThings