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
Bacterial meningitis leaves 1 in 5 people with disabilities such as hearing loss, brain damage and limb loss.
But meningitis is largely vaccine-preventable!
Parents/caregivers are urged to visit any primary health care centre to get their children/wards vaccinated against #meningitis.
Your input is crucial in shaping better prevention, treatment and control strategies against #Meningitis in Nigeria.
📋Take our #Meningitis KAP Survey to share your knowledge, attitudes, and practices.
🔗Survey link
https://forms.gle/R5uxSdet2nPNQvpRA
#Meningitis spreads mostly from one person to another through respiratory droplets e.g. coughing, sneezing & close contact such as kissing
Meningitis can affect anyone at any age.
Seek medical attention if you experience symptoms.
#Meningitis is a serious infection that can lead to severe complications & death
Report immediately to a healthcare facility if you or a loved one experiences
➡️Neck pain
➡️Pain on looking at bright lights
➡️Vomiting
➡️Muscle/joint/limb pain
➡️Rash
➡️Seizures
➡️Cold hands & feet
#Meningitis vaccines are safe, effective, and give protection to your family and community.
Parents and caregivers, now is the time to catch up on the childhood immunisations that protect against meningitis.
Any form of #Meningitis is an emergency!
ALL healthcare workers are urged to have a high index of suspicion and immediately report if they notice these signs & symptoms in their patients:
➡️Fever/severe headache
➡️Vomiting
➡️Drowsiness
➡️Rash
➡️Seizures
➡️Muscle/joint pain
➡️Stiff neck
The spread of #meningitis is usually through:
➡️ Direct person-to-person contact, including droplets from the nose and throat of infected persons.
➡️Close and prolonged contact with an infected individual.
Visit the nearest health facility immediately if you notice any of the CSM-associated signs and symptoms.
#Meningitis is an inflammation of a thin layer of the connective tissue that covers the brain and the spinal cord.
This inflammation can be caused by infection with bacteria, viruses, parasites, fungi, injuries and certain drugs.
Know the symptoms to seek early health care.
Advisory:
https://ncdc.gov.ng/news/508/cerebrospinal-meningitis-public-health-advisory
#Meningitis is an epidemic-prone disease requiring immediate reporting in Nigeria.
ALL healthcare workers are urged to have a high index of suspicion if they notice these signs & symptoms in their patients:
➡️Fever/severe headache
➡️Vomiting
➡️Drowsiness
➡️Rash
➡️Seizures
➡️Muscle/joint pain
➡️Stiff neck
Bacterial meningitis is largely vaccine-preventable; #meningitis vaccines are safe, effective, and give protection to your family and community.
Parents and caregivers, now is the time to catch up on the childhood immunisations that protect against meningitis.
Hand washing is one of the most effective ways of preventing the spread of infectious diseases including #meningitis
Always wash your hands with soap under running water for protection against meningitis and other deadly diseases
Also ensure you and your loved ones are vaccinated with the recommended immunisations
Report immediately to a healthcare facility if you or a loved one experiences the below symptoms of #Meningitis
➡️Neck pain
➡️Pain on looking at bright lights
➡️Vomiting
➡️Muscle/joint/limb pain
➡️Rash
➡️Seizures
➡️Cold hands & feet
Early recognition saves lives