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
🌎 In the Himalayas, the snow leopard’s wide, fur-covered paws act like natural snowshoes, distributing weight and keeping it from sinking on deep mountain snow. ✨
#wildlife⚡#adaptation⚡#Himalayas
👉subscribe Interesting Planet
🌎 The larva of the Himalayan glacier midge survives temperatures as low as -17°C by producing special proteins that act like antifreeze, preventing ice crystals from damaging its tissues. This adaptation lets it thrive in some of the coldest, highest places on Earth. ✨
#insects⚡#adaptation⚡#Himalayas
👉subscribe Interesting Planet
🌍 The Himalayas are rising by about 5 millimeters each year as the Indian and Eurasian plates continue to collide. This ongoing uplift makes these mountains among the youngest and fastest-growing on Earth. ✨
#mountains⚡#Himalayas⚡#tectonics⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌎 Bar-headed geese cross the Himalayas during migration, flying at altitudes above 7,000 meters. These birds have special hemoglobin that helps them absorb oxygen efficiently in thin air. Their migration route includes nonstop flights of up to 1,600 kilometers. ✨
#migration⚡#birds⚡#Himalayas
👉subscribe Interesting Planet
👉more Channels
🌎 In the soaring skies of the Himalayas, the bar-headed goose migrates over Mount Everest, flying at altitudes above 8,000 meters—higher than any other bird. Special hemoglobin in their blood enables them to absorb oxygen efficiently in the thin air, making this epic journey possible each year. ✨
#migration⚡#birds⚡#Himalayas
👉subscribe Interesting Planet
🌎 Mount Everest's border runs exactly along the Nepal-China divide, making its summit shared by two countries. Hikers can reach the top from either side, but the official border marker is a small metal pole embedded in the ice at 8,848 meters—the highest international boundary on Earth. ✨
#borders⚡#geography⚡#Himalayas
👉subscribe Interesting Planet
👉more Channels
🌍 The Eastern Himalayas are a biodiversity hotspot with over 10,000 plant species, and nearly a quarter of them are found nowhere else, despite covering less than 2% of India’s total area. ✨
#biodiversity⚡#Himalayas⚡#ecology⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 The Kalapani region is a small Himalayan area claimed by both India and Nepal. Its strategic location at the tri-junction with China makes it a unique hotspot of geopolitical geography. ✨
#borders⚡#dispute⚡#Himalayas⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌎 High in the Himalayan valleys, the Himalayan blue poppy blooms with dazzling blue petals. Its color comes from unique pigments that protect it from intense ultraviolet sunlight found at high altitudes. ✨
#flowers⚡#adaptation⚡#Himalayas
👉subscribe Interesting Planet
🌍 In Himalayan valleys, local communities have revived ancient glacial water channels called "kuls" to guide meltwater for farming. These living systems adapt to changing ice and rainfall each year. ✨
#Himalayas⚡#adaptation⚡#irrigation⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌎 The Himalayan honey bee builds its hives on high cliffs, crafting giant honeycombs and producing reddish honey with unique psychoactive properties prized by local tribes. ✨
#honeybee⚡#Himalayas⚡#nature
👉subscribe Interesting Planet
🌎 Some Himalayan glaciers are “surge glaciers,” moving up to 100 times faster than normal for short periods. These icy rivers can suddenly speed up, advancing kilometers in months instead of centuries—reshaping valleys with astonishing power. ✨
#glacier⚡#Himalayas⚡#earth
👉subscribe Interesting Planet