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
Take our quiz to test your HDB knowledge ⬇️ Are you ready to #BTOgether? Let’s see how much you know about buying a BTO flat!
P.S. No stress, this is an open book quiz 😉 You can check out these BTO-related guides on MyNiceHome first:
💰CPF Housing Grants for HDB Flat Buyers
🔍HDB Flat Types and Classification
🏠How to Buy a BTO Flat
How will your 2024 look like? If you’re planning to apply for a BTO flat in 2024, you can look forward to 3 sales launches this year – with the first sales launch happening in February!
Apply for your HFE letter by 15 January, if you’re thinking of to participating in the upcoming February sales launch. Get ready to #BTOgether🏠 Find out more at https://homes.hdb.gov.sg.
Planning to purchase a new home at the December sales launch? Check out which flats you can consider according to your monthly household income!
Work out your housing budget with HDB’s online calculators at
https://homes.hdb.gov.sg#BTOgether
Looking for a 4-room flat this sales launch? Here’s what the sums could look like.
Head over to https://homes.hdb.gov.sg to find out more about the grants and schemes available for first-timer families, and use our financial calculators to plan your purchase. #BTOgether
Looking for a 3-room flat this sales launch? Here’s what the sums could look like.
Head over to https://homes.hdb.gov.sg to find out more about the grants and schemes available for first-timer families, and use our financial calculators to plan your purchase. #BTOgether
Check out the prices of each flat type on offer this sales launch! Work out your housing budget with HDB’s online calculators at https://homes.hdb.gov.sg#BTOgether
JUST IN: 6,057 flats on offer at the December BTO sales launch! Find out more about the projects at Bedok, Bishan, Bukit Merah, Bukit Panjang, Jurong West, Queenstown, and Woodlands.
About 50% of the BTO flats launched this sales launch have a wait time of 4 years or less – for those who are looking to move into their flats sooner, the flats at Sin Ming Residences have wait time of about 2 years and 8 months, while Jurong Arcadia has a wait time of about 3 years and 1 month.
Get your HFE letter ready, and apply for your new home at https://homes.hdb.gov.sg by 11 December. #BTOgether
It’s 11/11 and we did not forget you 💖 In the second half of 2024, singles can apply for 2-room Flexi flats across all HDB projects islandwide, not just in non-mature estates! We will also launch up to 14,000 2-room Flexi BTO flats from 2024 to 2026 to meet demand. #BTOgether
Ready to #BTOgether at the upcoming sales launch? It’s as easy as 🔤!
To plan your budget, use our online calculators at https://homes.hdb.gov.sg. Simply input the info from your approved HFE letter, and you will be able to work out your flat budget.
More about the new First-Timer (Parents & Married Couples) category and priority schemes.
🏠 Gearing up to #BTOgether?
💰 Learn how to assess your financial fitness, plan for a home purchase, and plan ahead for your life as a couple at the Institute of Financial Literacy’s free financial planning workshop!