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
A study on men found that eating garlic made their body odor smell more pleasant, more attractive, and less intense. Researchers collected sweat samples and had others rate the smell.
Note: The study tested sweat, not their breath.🤪
🧄👃🧪
[Read more]
@googlefactss
#ScienceFacts#DidYouKnow#HumanBody#Research
If you have ideas or feedback contact us:
@Googlefactss_Feedback_bot
The human digestive system is about 7–9 meters (23–30 feet) long. The small intestine measures about 3–7 meters (10–23 feet), and the large intestine is about 1.5 meters (5 feet) long. Food typically takes 24 to 72 hours to travel from the mouth to the toilet. This time can differ depending on what you eat, how much water you drink, and how active you are.
🧠📏⏱️
[Read more 1]
[Read more 2]
@googlefactss
#HumanBody#DigestiveSystem#ScienceFacts#DidYouKnow
A brain freeze happens when something very cold touches the roof of the mouth or the back of the throat. This causes blood vessels in that area to quickly narrow and then widen again. This change activates a nerve that sends pain signals to the brain, which is why the pain is felt in the head. The sensation usually lasts only a few seconds to about a minute.
🧊🧠⚡
[Read more]
@googlefactss
#BrainFreeze#HumanBody#ScienceFacts#Health
If you have ideas or feedback contact us:
@Googlefactss_Feedback_bot
Babies are born with around 30,000 taste buds. Adults have about one-third of that number. This means babies can taste more flavors than grown-ups. As people get older, they lose many taste buds, which changes how they experience food. 👶🍎
[Source]
@googlefactss#TasteBuds#Babies#ScienceFacts
Psychopaths, often called ‘evil,’ lack empathy and guilt. They were once seen as untreatable. New studies show therapy like CBT and computer training can reduce violence and help them feel empathy. Treatment is limited but promising. 🧠💡
[Read more]
@googlefactss#Psychopathy#Therapy#MentalHealth#ScienceFacts
Women outperform men in recognizing all faces, with a particular advantage for female faces. 👩🦰👨🦱
They recognize both male and female faces better than men do. Men do not show this same bias toward their own gender.
[New Link1] [New Link2]
@googlefactss#Psychology#FaceRecognition#GenderDifferences#ScienceFacts
Ants don't have lungs. They breathe through tiny holes along the sides of their bodies called spiracles. These connect to a network of tubes (tracheae) that deliver oxygen directly to their tissues.
[Read more]
@googlefactss
#Ants#Biology#Entomology#ScienceFacts
People who eat the mushroom Lanmaoa asiatica raw or undercooked have reported seeing tiny human-like figures moving around them.
These are called lilliputian hallucinations.
Reports from people across different cultures and backgrounds describe similar details, including small figures walking on floors and furniture.
The effects can begin 12–24 hours after eating and may last 1–3 days.
Some cases are serious and require hospital care.
Don't try this yourself..
🍄😵💫🧚♀🦄🍄🟫
[Read more 1]
[Read more 2]
[Read more 3]
@googlefactss
#Mushrooms#ScienceFacts#Hallucinations#Nature#DidYouKnow
If you have ideas or feedback contact us:
@Googlefactss_Feedback_bot
15 December 1970, Venera-7 became the first spacecraft to land on Venus and send data back to Earth. Despite problems, it transmitted temperature information for 23 minutes after landing. The mission showed that Venus has extreme heat and pressure.
[Source]
@googlefactss
#Venera7🚀#Venus🌍#SpaceExploration#ScienceFacts
Serge Voronoff performed experiments transplanting testicle tissue from monkeys into men and boys to try to improve health and vitality. He also grafted testicle tissue onto female goats in his research. These practices were done in the early 1900s but later found to be ineffective and controversial.
🙈✂️⚽️⚽️
[Read more]
@googlefactss
#SergeVoronoff#MedicalHistory#Transplants#ScienceFacts
Pregnant women have one more organ than non pregnant women.
The placenta is a temporary organ that grows in the uterus during pregnancy. It connects the mother and baby through the umbilical cord. It gives the baby oxygen and nutrients and removes waste like carbon dioxide. It also makes hormones that help the pregnancy continue and lets helpful antibodies pass to protect the baby.
"Fun" fact:
After birth, the placenta leaves the body.
Some people keep it and even consume it..
🤰👶🍽
[Read more]
[Don't eat it]
#placenta#pregnancy#humanbody#sciencefacts#biology@googlefactss
Isaac Asimov was born on January 2, 1920. He wrote the Three Laws of Robotics:
1. Robots can't harm humans or let them be harmed.
2. Robots must follow human orders unless it breaks the first law.
3. Robots must protect themselves unless it breaks the first or second law.
🤖📜
[Read more]
@googlefactss
#IsaacAsimov#Robotics#ThreeLaws#ScienceFacts