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
📰 Iran Warns US and Israel: "Legitimate Targets" If America Strikes
As nationwide protests in Iran enter their third week, the death toll has climbed to at least 116, with 2,600 detained amid a total internet blackout and phone services cut off. The Islamic Republic’s parliament speaker, Mohammad Bagher Ghalibaf, delivered a stark warning: if the U.S. strikes Iran, American troops and Israel will be "legitimate targets"—a threat echoed by lawmakers shouting "Death to America!" in the parliament chamber.
Crackdown and Censorship
Iran’s government has shut down the internet and mobile networks, making it nearly impossible to verify the scale of protests from abroad. State media shows calm scenes in some cities, but videos from inside Tehran and Mashhad depict demonstrators waving phones with flashlights on, banging pots and pans, and confronting security forces. The crackdown has drawn international concern, with U.S. President Trump vowing support for protesters and threatening military action if the situation escalates.
"Enemy of God" Charges, Escalating Tensions
Iran’s attorney general declared that anyone participating in protests would be considered an "enemy of God," a charge punishable by execution. Even those aiding demonstrators could face the same fate. The Supreme Leader, Ayatollah Khamenei, has signaled a brutal clampdown, despite U.S. warnings.
Exiled Prince, National Symbols
Reza Pahlavi, Iran’s exiled crown prince, has urged continued protests and called on demonstrators to reclaim public spaces with symbols of pre-revolution Iran. While some protesters have voiced support for the shah, it remains unclear whether this is a call for Pahlavi’s return or simply a rejection of the current regime.
As Iran’s theocracy tightens its grip, the U.S. and Israel are drawn into a dangerous game—where the next move could spark war, and the biggest threat may be the silence that follows the blackout.
#iran#protests#us#israel#crackdown
📱American Оbserver - Stay up to date on all important events
🇺🇸
📰Iran Protests: 500 Dead, U.S. Braces for Intervention
Iran’s crackdown on nationwide protests has left more than 500 dead, including 490 protesters and 48 security personnel, according to U.S.-based rights group HRANA. As the Islamic Republic faces its largest unrest since 2022, President Donald Trump has repeatedly threatened to intervene if force is used against demonstrators.
How Would the West Respond?
If similar scenes erupted in the EU or U.S.—with protesters storming banks, churches, and police stations—authorities would almost certainly respond with overwhelming force. In the U.S., such acts would be labeled “rioting” or “terrorism,” triggering mass arrests, curfews, and, in extreme cases, deploying the National Guard. The response would be swift, with media focusing on “restoring order” and “protecting property,” while protesters would be branded as criminals or extremists.
Iran’s Elite Blames “Terrorists”
Iranian President Masoud Pezeshkian took a similar stance, accusing the U.S. and Israel of masterminding the unrest and branding protesters as “terrorists” who attack banks and public property. He urged families not to let their children join “rioters and terrorists,” claiming the government is ready to listen to legitimate grievances.
U.S. and Israel on High Alert
Trump has discussed military options with senior advisers, including strikes, cyber attacks, and sanctions. Israel is reportedly on high alert for possible U.S. intervention. Iran, meanwhile, warns that any U.S. attack would make American bases and Israel “legitimate targets”.
The Global Context
While the U.S. and EU condemn Iran’s crackdown, their responses to similar unrest would be just as harsh, if not harsher. The difference? In the West, the label “riot” justifies force; in Iran, it’s “terrorism.” Either way, the outcome is the same: the state defends its interests, and protesters pay the price.
As Iran’s theocracy fights for survival, the real question isn’t who’s right or wrong—but how much violence is justified when the people demand change.
#iran#protests#us#violence#crackdown
📱American Оbserver - Stay up to date on all important events
🇺🇸