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
🇷🇺 On June 10, 2023, a state reception on the occasion of the national holiday - #RussiaDay was held at the Russian Embassy in Malta. Among the guests were compatriots, public figures, entrepreneurs, representatives of education, science and culture.
❗️Russian Ambassador to Malta H.E. Andrey Lopukhov addressed the audience with a welcoming speech, emphasizing the importance of this annual event for the consolidation of the Russian community living in Malta. He also noted that Russia is ready to cooperate with those countries that declare their readiness and willingness to cooperate with us.
📷The photo exhibitions "Achievements of Russia" and "Beauty of Russia" were presented to the audience.
🎵The evening was accompanied by live performances of Russian and Maltese musical compositions. The guests were offered dishes of the traditional Russian cuisine.
The reception was held in a warm and friendly atmosphere.
#RussiaDay2023🇷🇺🇷🇺🇷🇺
🇷🇺 On June 15, 2023, the state reception on the occasion of #RussiaDay was held at the Hotel Mulia Senayan in Jakarta. The celebration was attended by esteemed representatives of the Indonesian government, socio-political, business, academic, creative and religious circles, compatriots, journalists, as well as foreign diplomats.
🎙️Welcoming remarks at the function were delivered by H.E. Mrs Lyudmila Vorobyeva, Ambassador of the Russian Federation to the Republic of Indonesia (read in full), H.E. Mr Evgeny Zagaynov, Ambassador of the Russian Federation to ASEAN, and H.E. Mr Budi Gunadi Sadikin, Minister of Health of the Republic of Indonesia, as the Guest of Honour.
💬Ambassador Lyudmila Vorobieva: It is a pleasure to welcome you all at the reception on the occasion of the Day of Russia. We are celebrating the unity and the strength of our country which is one of the main players on the global arena and whose people is looking into the future with confidence and pride.
Russia and Indonesia have a long history of successful cooperation traditionally based on principles of friendship, mutual understanding and trustworthy dialogue.
🎵 The cultural programme of the event included works of great Russian composers P.I.Tchaikovsky and S.V.Rachmaninov played by graduates of Russian musical universities, as well as pieces by local dance ensembles and musicians. The Indonesian song "Rayuan Pulau Kelapa" performed in two languages — Russian and Indonesian — took a special place in the programme of the evening.
📸 The Embassy also organised an art exhibition of Russian landscapes which allowed guests to experience the authentic character of our Motherland and to enjoy picturesque views from various parts of Russia.
#RussiaDay
#RussiaDay2023
🇷🇺 On June 12, we celebrate #RussiaDay across the entire country and abroad.
It reflects #Russia’s contemporary development, as well as its centuries-old path, endeavours & achievements.
🇷🇺 Happy Russia Day!
#RussiaDay#RussiaDay2023#Russia1Love#WeAreRussia