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
Operation Paperclip was a secret U.S. program after World War II. It brought over 1,500 German and Austrian scientists to the United States. Many had been members of the Nazi Party. They worked on military, aeronautics, and space research. Their Nazi pasts were ignored so the U.S. could use their expertise and keep it from the Soviet Union.
🇺🇸🧑🔬🚀
[Read more]
@googlefactss
#OperationPaperclip#HistoryFacts#ColdWar#Science#NASA
GERMANY IS A NAIVE PAWN OF THE USA WITH SEEMINGLY NO POWER TO SAVE ITSELF.
The #USA has failed against #Russia:
• It has missed its military target and this failure is damaging America’s prestige as the greatest military power.
• The #sanctions war against Russia are a complete failure. The West is weakened while Russia strengthens. The #IMF figures speak volumes: Germany doesn’t even make the list.
“The primary interest of the United States through the last century-that is, #WW1, #WW2, and the #ColdWar, has been the relationship between Germany and Russia.
If united, those two would be the only power that could threaten us-and so we have to make sure that doesn’t happen.”
George Friedman
The aim is therefore to prevent Germany from teaming up with Russia.
If it is not possible to weaken Russia as a major opponent, there is the option of preventing the alliance by turning #Germany and Russia into enemies and/or destroying Germany (for the third time after 1918 and 1945)
Operation Osoaviakhim was a secret Soviet program after World War II. Over 2,500 German scientists, engineers, and technicians and their families were taken from the Soviet zone of Germany to the USSR.
They worked on Soviet military, weapons, and rocket technology. The goal was to use German expertise to strengthen the USSR and keep it from falling into Western hands.
Basically the Soviet version of operation Paperclip📎
🇷🇺🔬🚀
[Read more]
@googlefactss
#OperationOsoaviakhim#ColdWar#HistoryFacts#WWII#SovietUnion#Science#operationpaperclip
Project MK‑ULTRA was a secret CIA program during the Cold War. It ran from 1953 to 1964. The CIA tested mind control using LSD, hypnosis, electroshock, and sensory deprivation. Some experiments gave drugs to people without their knowledge, isolated subjects for long periods, or exposed them to extreme stress. Under Dulles, the CIA opened secret prisons in West Germany and Japan, advised by Walter Schreiber, former Surgeon General of the Nazi army. Schreiber had avoided imprisonment after World War II and was brought to the West by U.S. intelligence, likely as part of programs like Operation Paperclip. Most records of MK‑ULTRA were destroyed in 1973, but investigations later revealed the program.
🧠🔬🇺🇸
[Read more]
@googlefactss
#MKULTRA#CIA#HistoryFacts#Science#ColdWar#MindControl#notAtheory