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
🇲🇽#Mexico: Footage shows clashes between CDS MF sicarios and CDS Chapitos cartel members during a firefight somewhere in Sinaloa.
At the beginning of the footage, a CDS MF sicario can be seen lighting the fuse of an improvised grenade before throwing it toward rival members.
(via @ProjectOSCT)
🇲🇽#Mexico: A shooting attack has occurred at the ancient pyramids of Teotihuacan earlier today, where a gunman opened fire randomly on nearby people with a revolver.
A Canadian tourist was killed in the attack, and several others were injured. The shooter later took his own life.
(via @war_noir)
🇲🇽#Mexico: A school shooting occurred earlier this morning local time in Lázaro Cárdenas, at the Anton Makarenko high school campus on Francisco Villa Street, just a few hours ago in Mexico.
Initial reports indicate that the shooter, a 15-year-old student, attempted to enter the school armed with a rifle. He was confronted by two teachers who tried to stop him, but he opened fire, killing both at the scene.
Municipal Police responded quickly, and footage circulating online shows the moment officers detained the suspect at the scene.
The last videos show some of the content that the shooter has posted on his Instagram story shortly before the attack.
These include footage of him brandishing a rifle, as well as content associated with “incel” ideology, including edits referencing a school shooting and Charles Manson.
🇲🇽#Mexico: Aerial footage showing a drone operated by the Sinaloa Cartel (Mayo Faction) dropping an explosive payload on a vehicle belonging to a rival cartel in Sinaloa.
(via @war_noir)
🇲🇽#Mexico: Chest-rig footage shows a firefight between SEDENA Mexican special forces and a group of sicarios in Guadalupe y Calvo municipality, in the mountainous region of Chihuahua, three days ago.
During a surveillance operation on a road connecting El Ocote and Atascaderos, the troops discovered a position held by 15 sicarios. Upon spotting the security forces, the gunmen opened fire.
In the exchange of gunfire, two sicarios were killed on the spot, while three others were captured. No casualties were reported among the security forces, although one officer was injured by what was described as shrapnel from a grenade.
(via @blogdelnarcomex on X)
🇲🇽#Mexico: Helmet cam footage from a Mexican soldier, part of the SEDENA Special Forces, during surveillance and reconnaissance operations in Nayarit State.
What is notable in this footage is the use of anti-drone equipment designed to jam drones operated by the cartels.
(via @overview.mexsof on IG)
Kabo-san-Lukas, #Mexico🇲🇽
The southern Mexican resort on the Pacific coast is the Kabo-San-Lucas resort.
Kabo-san-Lukas is a relatively young resort. It was founded about a hundred years ago. Its story begins with a small fishing village. Fishing brought a good income, and the village gradually grew.
There are amazingly beautiful beaches, fishing, walks on a yacht along the coast and a meeting with whales, surfing and immersion.
From January to March, whales swim close to the coastline. You can take a tour and go to the open sea to better see these huge mammals.
🇲🇽#Mexico: Reports are emerging of drone attacks in the town of Arroyo Grande, part of the municipality of Sanalona.
Drones carrying explosive payloads, reportedly operated by cartels, caused damage and civilian casualties in the area. Footage shows an injured civilian walking towards the street allegedly asking for help after being wounded. One vehicle was completely burned, and one person was killed in the attack.
(via @ZuluCanal)
🇲🇽#Mexico: A group of armed men, allegedly loyal to the CJNG cartel, have opened fire on the Municipal Presidency building in Jiquilpan, Michoacan.
(📹 via @belikmexican)
🇲🇽#Mexico: Clashes and arson attacks have continued into the night.
CJNG sicarios have stormed the state-owned "Banco del Bienestar" and attacked federal forces in the town of Ojuelos, Jalisco.
Other clashes were reported in multiple parts of Mexico, with CJNG sicarios targeting Mexican army troops.