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
Ik geloof dat alleen een grote oorlog, een handelsoorlog of een langdurige economische recessie ertoe zou leiden dat Europa en de Verenigde Staten hun militaire uitgaven uit balans zouden brengen, en dat zou het moment zijn waarop Israëls macht zou verzwakken. De bevrijding van Palestina verwijst naar het antikolonialisme en de onlangs onafhankelijk geworden landen in Azië, Afrika en Latijns-Amerika na de Tweede Wereldoorlog. Na de Tweede Wereldoorlog waren Europese landen ook bezig met de wederopbouw en verzwakte hun overzeese koloniale invloed.
#Palestine
前線的民眾及武裝
感謝: 也門 黎巴嫩 伊朗
沒有: 遜尼派國家及組織, 因為所有遜尼派國家不是以色列同盟就是投降給以色列。
(緊記: 加薩/巴勒斯坦組織是遜尼派, 但是只有什葉派國家及組織會付出人命和軍事支援他們)
https://t.me/NEWWORLDORDYR/29301?single
Er zijn geen soennitische landen en organisaties omdat alle soennitische landen bondgenoten van Israël zijn of zich aan Israël hebben overgegeven.
(De bovenstaande opmerkingen hebben geen betrekking op soennitische mensen, maar zijn alleen gericht op de elites van de soennitische samenleving)
#Palestine
Hamas en de Palestijnse Autoriteit veroordelen de opmerkingen van Trump dat hij wil dat Egypte en Jordanië Palestijnen uit Gaza accepteren .
哈馬斯和(西岸)巴勒斯坦權力機構譴責特朗普希望埃及和約旦接受來自加薩的巴勒斯坦人的言論。
#Palestine
🇵🇸#Palestine: Gaza's Radaa resistance forces, also known as the "Deterrent Forces", have ambushed a group of Israeli-backed militias in Khan Yunis, Gaza, using an IED.
The ambush and the footage are dated April 29th.
🇵🇸#Palestine: Footage showing Hezbollah militants targeting IDF positions in the Northern District of Palestine using a Grad MLRS rocket system two days ago.
(via @conflictarchive)
🇵🇸#Palestine: A 14-year-old Palestinian boy, Jad Jadallah, was shot and killed at close range by Israeli troops during a raid in al-Far'a refugee camp in the occupied West Bank last November.
Footage shows one of the soldiers shooting at the boy multiple times before leaving him bleeding on the ground, as the IDF blocked ambulances from reaching him for over 40 minutes. The 14 troops present then casually remained around him as he bled to death.
Eyewitness accounts and verified BBC footage show a soldier placing a rock next to Jad after he was shot in an attempt to stage evidence for the murder, even as the boy raised his hands pleading for help. An IDF spokesman claimed he threw a rock, but video evidence completely contradicts this. Despite claims of providing "initial aid," footage shows the troops offered no assistance.
After the shooting, Israeli troops have refused to provide aid and have never released any details on the killing. Israel has also refused to return the body.
Mojo, a popular drink brand in Bangladesh, updates its packaging to show the company’s support for #Palestine amid the ongoing Israeli genocide campaign in Gaza.
https://t.me/YediotNewsChat
🇵🇸#Palestine: A gold shop was allegedly robbed in Hebron, West Bank, by thieves disguised as IDF soldiers. The suspects were armed with IDF-issued carbines, including the M4 and Menusar.
(📹 via @war_noir)