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
#英文#港聞
Oct 4: Yung Wai-yip was subdued for holding white flowers. People nearby question the necessity of the force used by the #HKPolice.
Credit: boomheadhk
🍎保留一點真相、一些堅持:
https://t.me/appledailyhk26
🍎蘋果報料熱線: @Appledailyhk_bot
🍎蘋民不蘋則鳴!2.0
https://t.me/hkerappledaily2
#英文#港聞
More info about #721YuenLongTerrorAttack from the book "Among the Braves". It says that there were 5 different triad groups involved in the attack. They had a WhatsApp group which the #HKPolice had access to.
"A week prior, members of five separate triad groups joined a WhatsApp group to discuss plans to “defend their homeland,” Yuen Long. It was rare for these groups to come together, as they often clashed over their share of illicit business. As the triad groups coordinated their plans for July 21, a detective sergeant from the anti-triad bureau that oversaw the area was reading along. He had managed to gain access to the group chat, giving him unfettered insight into the plans."
The article also reported that Stephen Ng, political assistance to the mainland affairs mentioned about "wear white only" dress code.
"The political assistant to the secretary for mainland affairs had invited some others to join him at the banquet. He gave them a very specific dress code: Wear only white.”
5 years ago today, Chan Yin Lam passed away mysteriously. During 2019, many HongKongers went missing or died. Several times #HKPolice were caught throwing bags with the size of a human into the sea.
Her body was found in the sea, naked, yet people knew her claimed that she was a diver.
#HKProtest#neverforgiveneverforget
#FreeHK
#英文#港聞 #721
After 4 years, more information about #721YuenLongTerrorAttack has been revealed as the trial against Lam Cheuk-ting, a former democratic lawmaker who claimed to be there to understand the situation.
Witness B, who was a staff at the station time, said that police contacted the station through whatsapp to send 2 police to monitor the station on July 19th, 2 days before the attack.
On 20th, police arranged to have 2 police to standby at the monitor room starting at 5:00PM on 21st.
There were 2 police in the monitor room during the attack on 21st.
Clearly, #HKPolice knew that the local thugs had planned the attack 2 days before the incident.
🍎保留一點真相、一些堅持:
https://t.me/appledailyhk26
🍎蘋果報料熱線: @Appledailyhk_bot
🍎蘋民不蘋則鳴!2.0
https://t.me/hkerappledaily2
#HongKongers express fear as govt considers expanding #HKPolice power under proposed #Article23 security law. Extended detention period without charge and restrictions on legal representation raise concerns about #individualrights and freedoms.
https://hongkongfp.com/2024/03/07/hong-kong-considers-extending-detention-period-of-arrestees-to-up-to-14-days-in-national-security-cases/
#HongKong#PolicePower
#英文#港聞
Oct 17: A student held piece of paper writing "721唔見人" at a college recruitment event which #HKPolice participated. It refers to the day no police showed up when thugs attacked citizens indiscriminately on July 21, 2019. The school security told him to leave soon after.
#721YuenLongTerrorAttack
#721YuenLongAttack
#HKPoliceTerrorist
🍎保留一點真相、一些堅持:
https://t.me/appledailyhk26
🍎蘋果報料熱線: @Appledailyhk_bot
🍎蘋民不蘋則鳴!2.0
https://t.me/hkerappledaily2
Jun 15: Leung Ling-kit wore a yellow raincoat with an umbrella standing at Pacific Place Patio at 4:30. He wrote “Carrie Lam kills Hong Kong” & “Black Cops are cold blooded” on a banner and hang it at the building for everyone to see. Police and negotiators went but did not allow anyone to go near him. At 9:15pm, he jumped down. That was the beginning of the 2 million+1 people march the next day.
People still commemorate him in Hong Kong to this day while countless of #HKPolice was standing by as if having a flower in hand can damage #nationalsecurity. This is the excuse they use to arrest people anyway. The laws that we having been fighting against, the extradition bill, national security law & article 23 are laws that criminalize thoughts.
#leunglingkit#HongKongProtest#5demandnot1less#fightforfreedom#standwithhongkong