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
It’s May the 4th! Saving the earth is in your hands, so may the force be with you.
Like ice cream in this hot Singapore weather, the earth’s great ice caps are melting due to global warming! It’s time to ask ourselves if we have done enough for the earth. If not, start here: www.mewr.gov.sg/climateaction#ClimateActionSG
💰 Save around $80 annually when you upgrade your refrigerator from 1-tick to 3-tick or above!
🌱 Take climate action by switching to more energy- and water-efficient appliances with your Climate Vouchers!
The Climate Friendly Households Programme now offers:
🎉 Additional $100 in Climate Vouchers, on top of the $300 in 2024 for eligible HDB households (total $400!)
🏠 Now extended to all Singapore Citizen households in private properties too
⏰ Valid until 31 Dec 2027
👉 For more details: go.gov.sg/cfhp-info
#EnergyEfficiency#ClimateActionSG#SustainableSG
💡✨ Bright savings are just a switch away. Switch 5 compact fluorescent lamps for 2-tick LED bulbs and save $32 a year!
Take climate action by switching to more energy- and water-efficient appliances with your Climate Vouchers.
✅ The Climate Friendly Households Programme now offers an additional $100 in Climate Vouchers, on top of the $300 offered in 2024 for eligible HDB households.
✅ The programme has also been expanded to include Singapore Citizen households living in private residential properties in 2025.
✅ This means that all eligible HDB and private households have been issued $400 worth of Climate Vouchers.
These vouchers are valid until 31 Dec 2027.
More details at go.gov.sg/cfhp-info
#EnergyEfficiency#ClimateActionSG#SustainableSG
💰𝗖𝗼𝗼𝗹 𝘀𝗮𝘃𝗶𝗻𝗴𝘀 𝗮𝗹𝗲𝗿𝘁! Upgrade to a 5-tick air-conditioner and enjoy about $450 savings in utilities a year compared to a 1-tick model.
Take climate action by switching to more energy- and water-efficient appliances with your Climate Vouchers.
The Climate Friendly Households Programme now offers an additional $100 in Climate Vouchers, on top of the $300 offered in 2024 for eligible HDB households. The programme has also been expanded to include Singapore Citizen households living in private residential properties in 2025. This means that all eligible HDB and private households have been issued $400 worth of Climate Vouchers. These vouchers are valid until 31 Dec 2027. More details at go.gov.sg/cfhp-info
#EnergyEfficiency#ClimateActionSG#SustainableSG
The Climate Friendly Households Programme now offers an additional $100 in Climate Vouchers, on top of the $300 offered in 2024. It has been expanded to include Singapore Citizen households in private residential properties on top of eligible HDB households.
Take climate action by switching to more energy- and water-efficient appliances with your Climate Vouchers. The vouchers are valid until 31 Dec 2027.
Visit go.gov.sg/climatevouchers for more info.
#ClimateActionSG#SustainableSG#EnergyEfficiency
It's #EarthHour tonight! Don’t forget to turn off all your lights at 8.30pm today. And because we only have one earth, let’s ensure we use our resources wisely. Read more here: earthhour.org
#ClimateActionSG
#SGBudget2025 The enhanced Climate Friendly Households Programme will now cover around 90% of households in Singapore!
From 15 Apr 2025, eligible HDB households will receive an additional $100 in Climate Vouchers, on top of the existing $300 offered in 2024.
The programme will also be expanded to include Singapore Citizen households living in private residential properties.
This means that eligible households staying in HDB and private residential properties can claim a total of $400 worth of Climate Vouchers! These vouchers are valid until 31 Dec 2027.
More info at go.gov.sg/nea-cos2025-cv
#ClimateActionSG#SustainableSG
This year's theme, 'Creating Resilient Communities through Disaster Risk Reduction and Climate Change Mitigation and Adaptation’, highlights the urgent need to build stronger, more adaptable communities in the face of global challenges.
By taking climate actions such as practising the 3Rs and adopting energy-saving habits, all of us can play a part in building a more resilient and #SustainableSG🌱💪
#WorldEnvironmentalHealthDay#SustainableSG#ClimateActionSG
Building climate resilience will keep Singapore steady pom pi pi for the next 60 years! 💃🕺
Let’s take action for a #SustainableSG by adopting energy-saving and #ReduceReuseRecycle habits.
#SG60#ClimateActionSG