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
🌍 The world’s shortest river, the Roe River in Montana, flows only about 61 meters from its source to its mouth. Despite its tiny length, it’s officially recognized as a river. ✨
#rivers⚡#hydrology⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 Water molecules in the ocean today could have once traveled through glaciers, rivers, or clouds—completing a global journey called the water cycle that never truly ends. ✨
#hydrology⚡#watercycle⚡#earth⚡#geography⚡#nature
👉subscribe Amazing Geography
👉more Channels
🌍 Some of the water we drink today has cycled through dinosaurs and ancient forests. Water molecules can take thousands of years to complete a single journey through the global water cycle. ✨
#hydrology⚡#watercycle⚡#earth⚡#geography⚡#nature
👉subscribe Amazing Geography🌍
🌍 The Amazon River’s water travels over 6,400 kilometers from Andes glaciers to the Atlantic, but some of its rain comes from clouds recycled multiple times through plant evaporation along the journey. ✨
#hydrology⚡#rivers⚡#rainforest⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Rivers in the Amazon basin recycle rainwater so efficiently that a single water droplet may fall as rain and evaporate back into the sky up to seven times before leaving the forest. ✨
#hydrology⚡#rainforest⚡#rivers⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Water in the atmosphere is always on the move—at any moment, only about 0.001% of Earth’s water is in the air as vapor, yet this tiny fraction drives all rain, snow, and weather worldwide. ✨
#hydrology⚡#watercycle⚡#atmosphere⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Water vapor in the air isn’t just invisible—it’s crucial for moving energy around the planet. When vapor condenses into clouds, it releases heat that drives weather systems worldwide. ✨
#hydrology⚡#atmosphere⚡#watercycle⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Water trapped as snow and ice in the Himalayas slowly melts each spring, feeding rivers that bring life to billions across Asia. This seasonal meltwater is key to the region’s water cycle. ✨
#hydrology⚡#rivers⚡#glaciers⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Some of the world’s longest underground rivers are hidden in karst landscapes. These rivers can travel for dozens of kilometers beneath the surface before emerging in springs or caves. ✨
#caves⚡#karst⚡#hydrology⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Atmospheric rivers—narrow bands of moisture in the sky—can carry more water than the Amazon River. When these “rivers in the air” hit land, they unleash heavy rains and reshape water cycles. ✨
#hydrology⚡#rainfall⚡#climate⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 About 90% of the water exchanged in the global water cycle happens over the oceans, not land. Yet this invisible ocean-to-sky movement powers most of the world’s rainfall. ✨
#hydrology⚡#watercycle⚡#oceans⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 Recent satellites can map changes in Earth's gravity from space. This helps track shifting water underground after floods or droughts, revealing hidden changes on a continental scale. ✨
#remote-sensing ⚡#satellites⚡#hydrology⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels