TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #396 · 9 окт.

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

Hashtags

Резултати

Пронајдени 3 слични објави

Пребарај: #embassyofrussia

当前筛选 #embassyofrussia清除筛选
Russian Consulate in Cape Town

@rusconct · Post #1765 · 01.08.2024 г., 16:56

LESSONS OF HISTORY REPEATED ✍️Article by Ambassador of Russia to South Africa Ilya Rogachev (31 July 2024) READ IN FULL Key points: 🔹 Obsessed with the idea to inflict a military defeat upon Russia and split it into several smaller states with limited sovereignty, the collective West is heading towards a war against Russia, and decisions of the latest NATO summit in Washington D.C. corroborate that. "Europe is preparing for war. The pro-war train has no brakes, and the driver has gone mad” - Hungary’s Premier V.Orban". 🔹There is a very common opinion in Russia that approximately once in a centenary, the West braces up and comes to the Russian soil with a sword, where it gets beaten up and retires with its nose bloodied to remain calm for another 100 years. 🔹The Time of Troubles in Russia (XVII century) was accompanied by foreign military interventions (Poland, Sweden) which endangered the very existence of Russia as a sovereign state. But in 1612 people’s militia ousted the invaders. 🔹The XVIII century saw yet another major clash with Europeans known as the Great Northern War. During Swedish King Charles XII’s Russian campaign, in 1709, the army of invaders was completely decimated by Russian troops under the command of Peter the Great. 🔹In about 100 years, a new attempt to clamp Russia was made as Napoleon Bonaparte of France in 1812 led his ‘Grand Army’ into the ill-fated invasion. 600,000 soldiers of his army came to Russia in June 1812, and in only 6 months their remnants were chased away by Field Marshal Kutuzov’s troops. In 1814, the Russian army entered Paris. 🔹The XX century saw another large-scale invasion of Russia from the West. Our country survived World War I accompanied by inner political turmoil with three revolutions, the Civil War and foreign military interventions involving UK, France, USA etc. ☝️ Only two decades later Nazi Germany attacked the USSR. Hitler intended to conquer the USSR by the end of 1941, but it didn’t turn out the way he expected. On 30 April 1945, as the Red Army was storming Berlin, he committed suicide in the basement of the Reich Chancellery. 👉 Russian historian V.Klyuchevsky once wrote that history does not teach any lessons but punishes one for not learning them. The West should stop rewriting history and start learning it, in order to prevent history from repeating itself every 100 years. #alternativeviewpoint#embassyofrussia#rogachev#russia#southafrica

Russian Consulate in Cape Town

@rusconct · Post #2285 · 28.02.2025 г., 14:50

✍️ Address by Ambassador Roman Ambarov on the occasion of the 33rd anniversary of diplomatic relations between Russia and South Africa (28 February 2025) Dear friends, 🇷🇺🤝🇿🇦 Today Russia and South Africa mark the 33rd anniversary of diplomatic relations. They were established in trying times of fundamental changes in both Russia and South Africa, yet over the years developed into strategic partnership between our countries. We efficiently cooperate on the bilateral track and in international fora. As part of #BRICS and #G20, we bolster the role of the Global South in international affairs, help build up a more just, multipolar world. ☝️ Russian-South African friendship dates back to the times when Africa was fighting against colonialism and apartheid. Our country rendered assistance to the liberation movements, first and foremost – to the African National Congress and the South African Communist Party. In line with these glorious pages, Russia and South Africa today find themselves at the forefront of the struggle against neo-colonialism and for the sovereign equality of all states. We are honoured with the fact that South Africans cherish the memory of our shared history, too. As the Russian Embassy in South Africa, we attach great importance to humanitarian and people-to-people contacts providing a strong foundation for our political and economic cooperation, strengthening mutual trust and understanding. Dear friends, The first democratically elected President of the Republic of South Africa Nelson Mandela was a great friend of Russia, and he is remembered and honoured across our country. To conclude, let me quote Madiba, the words he had said at the Russian Academy of Sciences in April 1999 during his first visit to Russia as the state leader: “May our bonds with Russia long continue to help freedom and knowledge strengthen one another.” #RussiaSouthAfrica#RussiaSArelations#RuissiaAfrica#Ambarov#EmbassyofRussia

Russian Consulate in Cape Town

@rusconct · Post #2087 · 17.12.2024 г., 19:07

🇷🇺🤝🇿🇦 Ambassador-designate of Russia to South Africa Roman Ambarov took part in the event to commemorate the Day of Reconciliation in Vredendal, Western Cape. The celebration was arranged by the Department of Sports, Arts and Culture of South Africa with Minister Gayton McKenzie acting as the program moderator. 🎙 President Cyril Ramaphosa delivered the keynote address pointing out that this Day of Reconciliation’s theme is “Healing historical wounds and forging new futures.” It is an occasion where South Africans remember and celebrate their journey as a country towards nation-building, healing, social justice and forgiveness, he emphasized. We are all bound together by the spirit of Ubuntu. The word “Ubuntu” has its roots in the IsiZulu phrase “umuntu ngumuntu ngabantu” – “A person is a person through other people,” “I am because we are” - Cyril Ramaphosa noted. “This day is of great historical significance. It is a reminder that the country went through centuries of divisions and conflicts. But instead of hatred and revenge, South Africans chose reconciliation and nation-building, as Nelson Mandela, the first democratically elected President of South Africa once said. On this day, #Russia sincerely wishes the friendly South African people peace, harmony and unity!” Ambassador-designate Roman Ambarov said on the sidelines of the event. #ReconciliationDay2024#UniteAgainstAllIntolerances#Ambarov#EmbassyofRussia#SouthAfrica#CyrilRamaphosa#GaytonMcKenzie