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
Batteries are a big no-no in blue recycling bins as they could short-circuit and set fire to other materials.
Drop them off in e-waste recycling bins instead. Learn more: go.gov.sg/e-waste#RecycleOurEWaste
Give your e-waste a second life by recycling them at e-waste collection points!
Here’s where you can recycle your e-waste: go.gov.sg/e-waste
#RecycleOurEWaste#RecycleRight
Still holding on to your spoilt electrical & electronic devices that are beyond repair?
It’s time to let it go! Recycle them to recover precious materials (e.g. gold, silver, copper) that can be used to make new products.
Learn more about how to recycle your e-waste at go.gov.sg/e-waste
#RecycleOurEWaste#RecycleRight
𝗟𝗲𝘁’𝘀 𝗸𝗲𝗲𝗽 𝗲-𝘄𝗮𝘀𝘁𝗲 𝗼𝘂𝘁 𝗼𝗳 𝗼𝘂𝗿 𝗹𝗮𝗻𝗱𝗳𝗶𝗹𝗹𝘀!
Here’s how you can make a difference:
1. Fix your device instead of buying a new one
2. Opt for second-hand items
3. Donate working devices to someone who needs them
4. Recycle your e-waste: go.gov.sg/e-waste
Join us at the International E-waste Day event to learn more!
🕰️12 Oct 2025 (Sun), 11.30am to 5pm
📍Bedok Town Square
Every small action counts towards a greener future. 💚
#RecycleOurEWaste#RecycleRight
We all wish for abundance during Lunar New Year, so let’s preserve our planet’s precious resources by recycling e-waste properly. 🐰💚♻️
Find out where you can recycle your e-waste here: go.gov.sg/e-waste
#RecycleOurEWaste#RecycleRight
E-waste recycling bins are available from today, at selected Dairy Farm Group & Harvey Norman outlets, ahead of NEA’s national e-waste management scheme on 1 Jul 2021. Drop off your e-waste and earn points that can be redeemed for shopping vouchers. Find out where the bins are at https://go.gov.sg/e-waste
#RecycleOurEWaste#SayYEStoWasteLess
#DidYouKnow e-waste can have many useful materials, including gold, silver, copper or plastic, that can be recovered and made into new products?
Test your knowledge and share your views on e-waste recycling at go.gov.sg/ewaste-survey
#RecycleOurEWaste#SayYEStoWasteLess
Here’s a #FunFact on International E-waste Day: #DidYouKnow e-waste contains many useful materials, including gold, silver, copper or plastic, that may be recovered and made into new products?
♻️ Let’s #RecycleOurEWaste properly. Visit NEA’s (go.gov.sg/e-waste) and ALBA Singapore’s websites (www.alba-ewaste.sg) for the locations of the e-waste recycling bins and more information about the e-waste management system. #RecycleRight
Let’s also reduce the amount of e-waste generated by:
(a) considering if you really need to buy a new product, or if the current one can be repaired
(b) choosing second-hand products over new products
(c) donating devices that are in good condition to those who could put them to better use
It’s time to bring on the Recycletimus Prime! Let's roll out and give our e-waste a second life by making sure to #RecycleRight: go.gov.sg/e-waste
#TransformersOne#RecycleOurEWaste#SayYEStoWasteLess
It’s sales galore, with #BlackFriday, #CyberMonday, and the 12.12 sales coming up in the next few weeks, but before tapping on the check out button, ask yourself: “Do I really need this?”
For instance, if your current electronic device isn’t working, try sending it for repair, to save it from the landfill. And if it is beyond repair, don’t forget to drop it in a recycle bin. More at https://go.gov.sg/nea-recycle-e-waste
#RecycleOurEWaste#SayYEStoWasteLess
Give your e-waste a second life by recycling them this International E-waste Day 📱💻♻️
Find out more about how to recycle your e-waste at go.gov.sg/e-waste
Let’s also reduce the amount of e-waste generated by:
- Considering if you really need to buy new a product or if the current one can be repaired
- Choosing second-hand products over new products
- Donating devices that are in good condition to those who could put them to better use
#RecycleRight#RecycleOurEWaste#IEWD2024#InternationalEWasteDay2024#DataSecurity