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
Don’t forget to bring along your reusable shopping bag when you’re out buying your Lunar New Year goodies. Together, we can have a sustainable Year of the Rabbit! 🐰
#BYOB#SayYEStoWasteLess#TowardsZeroWaste
Don’t get a red card especially when it comes to saving the Earth! Say NO to disposables, and YES to reusables.
Together, we can move #TowardsZeroWaste and create a #SustainableSG! #SayYEStoWasteLess#BYOB
This Halloween, make your carbon footprint less scary!
🍿 Having a spooky movie night? Bring along reusable popcorn containers and cups.
👻 Hitting a few haunted houses? Don't forget to keep hydrated with a reusable bottle.
🍭 And if you’re thinking of hitting the sweet shops, keep a reusable bag handy.
#SustainableSG#BYO#BYOB
Bring your reusable bag when you go shopping! Every action counts when it comes to saving planet Earth, and a little goes a long way when it comes to savings 💰
Show the Earth and your wallet some love! #SayYEStoWasteLess#BYO#BYOB
Lock screen reminders are the new sticky notes. So set a trendy reminder to bring your own reusable bag before heading out!
Let’s save the planet, one bag at a time 🛍#BYO#BYOB#SayYEStoWasteLess
Remember to bring your reusable bags when you’re heading out to buy New Year goodies.
This way, you’ll save money while saving the environment. Cheers to a clean, green and prosperous new year. 🧧
#BYOB#SustainableSG#TowardsZeroWaste#LunarNewYear2024
#DidYouKnow the average family in Singapore that buys groceries weekly uses about 1,248 single-use plastic bags annually? 😱
Let’s #SayYEStoWasteLess by bringing along reusable bags when heading out! #BYO#BYOB
Santa’s not the only one with a reusable bag!
When visiting the mall to shop, let’s bring our reusable bags. Together, we can ensure fa-la-la-la-la, la-la-la-less packaging waste. 🛍️
#SayYEStoWasteLess#TowardsZeroWaste#BringYourOwn#BYO#BYOB
Level up your eco-game! ♻️💪 Tote-ally rockin’ a reusable bag = Saving money, slashing trash and giving our environment a healthy splash! 🌿🌏
#BYOB#ZeroWasteNation#Sustainability#SayYEStoWasteLess
For more news and updates on government announcements, follow us on WhatsApp Channels at go.gov.sg/wa-channels!😊
250911 || JohnMaat 𝕏 UPDATE
BYOB Season 3 Final Chef👨🍳
˗ˋˏ YUQI i-dle ˎˊ˗
Yuqi (in charge of all things 𝒮𝐸𝒳𝒴 ⒸⓊⓉⒺ for IDLE)
Would you like to watch the BYOB Wave Show?
> Gi
> Ginio
🔥15 episodes will be released tomorrow at 10 AM (KST)
🔗http://youtube.com/@John_maat
#BYOB#박준형#브라이언
#아이들#idle#우기#YUQI
–🦋
── @GIDLE_UPDATE ──