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
#newtgingrich : RT @RealAmVoice: "It is very clear that Putin has made a gamble — which is the gamble probably of his life."
@NewtGingrich joins the War Room to break down the cyber attacks and China displacing the United States.
Watch more War Room with #SteveBannon here: https://t.co/No6fL5Gjrqhttps://t.co/IqpJjfrwIf
Economic war with Russia on the horizon?
Steve Bannon:
“You’ve now got a major economic war that is going to kick up with Russia. They just put out the word. They said ‘Hey […] if you touch the $300 billion that you stole from us, each country that does it is going to answer to us personally.’ […] This is something we didn’t do to the Nazis, something we didn’t do to Imperial Japan… We gotta be very careful. Everybody is treading on thin ice on this one.”
#SteveBannon#Russia#war
👂More on Trump's Ear ⚠️
According to Steve Bannon, the United Kingdom is on the brink of civil war. Its leaders have allowed the country to be taken over, its institutions of power have been hollowed out, and those who resist are being punished. This is a battle for Western civilization.
This is why Donald Trump is not in London — because there are huge riots down there.
#SteveBannon#UK#civilwar
👂More on Trump's Ear ⚠️
January 6 panel moves to hold Steve Bannon in contempt
A U.S. congressional committee probing the deadly Jan. 6 assault on the Capitol said it would vote next week to hold Steve Bannon, a longtime adviser to former President Donald Trump, in contempt of Congress for refusing to comply with a subpoena.
#January6#Trump#SteveBannon#News#Reuters
Subscribe: http://smarturl.it/reuterssubscribe
Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled.
Get the latest news on: http://reuters.com/
Follow Reuters on Facebook: https://www.facebook.com/Reuters
Follow Reuters on Twitter: https://twitter.com/Reuters
Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en
➖@reutersworldchannel➖
October 15, 2021: Bill Clinton, Steve Bannon, FDA Moderna booster, Texas abortion law, Immigration
Top headlines on October 15, 2021: Bill Clinton in hospital, Steve Bannon, FDA Moderna booster, Texas abortion law, Biden's immigration plans
1. Ex-President Bill Clinton is recovering in hospital after being treated ‘for a non-COVID-19 infection.’ The 75-year-old was admitted on Tuesday evening.
2. A panel probing the U.S. Capitol assault will vote to hold Steve Bannon in contempt of Congress after the Trump advisor refused to comply with a subpoena.
3. U.S. FDA advisers voted in favor of booster shots of the Moderna vaccine for Americans aged 65+ and those at high risk of illness.
A U.S. appeals court rulesd to keep a Texas abortion ban in effect. The law bars the procedure as early as six weeks into pregnancy.
5. U.S. President Joe Biden's administration will restart Trump’s ‘Remain in Mexico’ policy by mid-November. The program forces asylum seekers to wait in Mexico for U.S. court hearings
#FDA
#COVID19
#USBorder
#Texas
#abortion
#SteveBannon
#CapitolRiot
#BillClinton
#Clinton
#Moderna
#Vaccine
#Booster
#US
#Mexico
#Migrants
#Biden
#UnitedStates
#Trump
#News
#Reuters
Subscribe: http://smarturl.it/reuterssubscribe
Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled.
Get the latest news on: http://reuters.com/
Follow Reuters on Facebook: https://www.facebook.com/Reuters
Follow Reuters on Twitter: https://twitter.com/Reuters
Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en
➖@reutersworldchannel➖