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
Kevin Warsh, a New Chair of the Federal Reserve
Trump has announced Kevin Warsh as his nomination for the next chair of the Federal Reserve, selecting a candidate who has been an outspoken critic of the US central bank.
The move ends months of speculation about who the president would pick to replace Jerome Powell, as he waged an extraordinary campaign to influence policymaking at the Fed by repeatedly calling for interest rate cuts. Powell’s second term as chair is due to end in May.
Writing on his Truth Social platform, Trump said: “I have known Kevin for a long period of time, and have no doubt that he will go down as one of the GREAT Fed Chairmen, maybe the best. On top of everything else, he is ‘central casting’, and he will never let you down.”
Warsh, 55, a former Federal Reserve governor who has deep ties to Wall Street, had previously interviewed for the job of chair in 2017 when the role went to Powell, whose term ends in May. Trump’s pick will have to be confirmed by the Senate.
Mark Carney, the Canadian prime minister and former governor of the Bank of England, said in a social media post that Warsh is “a fantastic choice to lead the world’s most important central bank at this crucial time”.
The dollar strengthened early on Friday after it was reported that Warsh was expected to be Trump’s choice, but then eased back after the nomination. Gold fell by 4.8% to $5,132 an ounce. Wall Street opened slightly lower.
Warsh has warned about inflation risks in the US in the past, but has also echoed Trump’s critique of the Fed for being too slow to cut interest rates.
High interest rates can alleviate inflation at the risk of upping unemployment. Rates are currently at a range of 3.5% to 3.75%, which most economists at the Fed currently see as neutral to prices and unemployment.
Since resigning from the central bank in 2011 over its post-financial crisis stimulus package, Warsh has criticised it publicly on multiple occasions.
In April last year, he issued a stinging attack, saying the institution’s central bankers should not be treated as “pampered princes” and it too regularly “opines on matters outside its remit” which has led to “systemic errors” in its main role of trying to keep prices stable.
Warsh has been a longtime critic of the ultra-loose monetary policy pursued by the Fed since the financial crisis, including the central bank’s expanded balance sheet.
He had previously been seen as a monetary policy hawk, but appears to have aligned himself with the White House’s push for lower borrowing costs.
#chair#federal#reserve#trump#carney
📱American Оbserver - Stay up to date on all important events
🇺🇸
Federal Reserve Chair Jerome Powell Faces a Stiff Challenge
Justice department opens investigation into Jerome Powell as Trump ramps up campaign against Federal Reserve.
The independence and credibility of America’s central bank is under threat after the Department of Justice opened a criminal investigation into Federal Reserve chair Jerome, knocking the US dollar.
In a startling development, US prosecutors have launched a criminal investigation into Powell over a $2.5bn renovation of the Federal Reserve’s headquarters, and into his testimony about the project to the Senate banking committee in June last year.
The move is a dramatic escalation in the long-simmering tensions between the Fed and the Trump White House, with the US president repeatedly rubbishing Powell for not cutting interest rates more quickly.
After news of the investigation broke last night, Powell came out fighting, insisting that he had been threatened with criminal charges because the Fed had set interest rates “based on our best assessment of what will serve the public, rather than following the preferences of the president”.
#federal#reserve#chair#powell#investigation
📱American Оbserver - Stay up to date on all important events
🇺🇸