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 Falkland Islands are home to the only known population of the Cobb’s wren, a small brown bird found nowhere else on Earth. These birds thrive in predator-free habitats, showing how isolated islands can protect unique species from extinction. ✨
#biodiversity⚡#islands⚡#birds
👉subscribe Interesting Planet
🌎 Border oddities abound in Earth’s geography! The Diomede Islands, just 4 km apart in the Bering Strait, belong to different countries and are separated by the International Date Line, meaning they are 21 hours apart in time despite being visible from each other. ✨
#geography⚡#borders⚡#islands
👉subscribe Interesting Planet
🚤Nusa Penida could be home to a floating hospital
🏥 Nusa Penida leaders are proposing a water ambulance service to respond quickly to emergencies.
🚨 There are currently no major hospitals on the islands of Nusa Penida, Nusa Lembongan and Nusa Ceningan near Bali. The small clinics that do exist are unable to treat emergencies and patients have to be brought to Bali by boat or evacuated by helicopter.
@BaliNews
#goodnews#health#islands
🌍 One of the youngest islands on Earth, Hunga Tonga-Hunga Haʻapai, formed in 2015 after an undersea volcanic eruption. New land like this is rare and offers scientists a natural laboratory. ✨
#islands⚡#volcanoes⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌎 The double coconut palm of Seychelles produces the world’s heaviest seed—up to 18 kilograms! Its giant, heart-shaped seed takes years to mature before dropping to the forest floor. ✨
#botany⚡#islands⚡#wonders
👉subscribe Interesting Planet
🌍 The Canadian Arctic Archipelago includes over 36,000 islands, making it one of the most complex island groups on Earth. These remote lands are mostly uninhabited and covered by ice much of the year. ✨
#islands⚡#arctic⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 Canada’s Manitoulin Island is the largest freshwater island in the world. It’s so big that it contains more than 100 lakes, and some of those lakes have islands of their own. ✨
#islands⚡#freshwater⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
The Philippines is an archipelago with about 7,641 islands. Around 2,000 islands are inhabited. More than 5,000 islands are unnamed. The islands are grouped into Luzon, Visayas, and Mindanao. The older count of 7,107 islands was updated after modern surveys.
🇵🇭🏝️🌊
[Read More]
@googlefactss
#Philippines#Islands#Geography#DidYouKnow#Facts
🌍 In recent decades, a growing number of small island nations are seeing rising sea levels drive migration, forcing some communities to relocate entirely from their ancestral homes. ✨
#migration⚡#islands⚡#climate⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 The ancient terraces of the Canary Islands blend natural volcanic slopes with centuries-old farming. These landscapes are so unique they’re recognized globally as a heritage site. ✨
#heritage⚡#agriculture⚡#islands⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Indonesia is the world’s largest archipelago, made up of over 17,000 islands. Some, like Java, are densely populated, while others remain so remote they still hold undiscovered plant species. ✨
#archipelago⚡#islands⚡#biodiversity⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels