TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #396 · 9 окт.

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

Hashtags

Резултати

Пронајдени 28 слични објави

Пребарај: #3rs

当前筛选 #3rs清除筛选
NEA Singapore

@NEASingapore · Post #373 · 26.06.2022 г., 01:27

Ever wondered what your used notebooks, tissue boxes and loose paper becomes after putting them into the blue bins? They are treated and recycled into new items such as egg trays! #3Rs#RecycleRight Not sure what can be recycled? Find out at go.gov.sg/recycleright!

NEA Singapore

@NEASingapore · Post #368 · 12.06.2022 г., 01:30

Recycling plastic can be confusing with the many plastic identification numbers. To keep things simple, just recognise and remember that these 3 groups that are ok to be put into Bloobin! Not sure what can be recycled? Find out at go.gov.sg/recycleright! #3Rs#RecycleRight

NEA Singapore

@NEASingapore · Post #335 · 14.04.2022 г., 09:31

Here’s another test for your recycling knowledge! Do you know which items can or cannot be placed into the blue recycling bins? Not sure what can be recycled? Find out at go.gov.sg/recycleright! #3Rs#RecycleRight

NEA Singapore

@NEASingapore · Post #291 · 12.12.2021 г., 03:29

It’s finally that time of year to pull out our festive decorations! Rather than buy new decorations each year, keep them to be reused each year -- they never go out of style 😊#SayYEStoWasteLess#3Rs

NEA Singapore

@NEASingapore · Post #280 · 04.11.2021 г., 02:00

#RecycleRight Tip: Flatten cardboard boxes, even smaller ones such as tissues boxes. This gives you more room in your recycling corner, and frees up space in the recycling bin! #3Rs

NEA Singapore

@NEASingapore · Post #338 · 21.04.2022 г., 09:31

#DidYouKnow not all takeout containers or disposable plastics can be recycled? If they’re greasy or dirty, bin them to avoid contaminating other recyclables. Not sure what can be recycled? Find out at go.gov.sg/recycleright! #3Rs#RecycleRight

NEA Singapore

@NEASingapore · Post #450 · 25.10.2022 г., 00:45

Dressing up as your favourite superhero this Halloween? Get creative and make a costume using everyday household items. When you’re done, recycle or reuse what you can of your outfit, so that your superhero legacy will continue to live on 🦸‍♂️ #3Rs#ReduceReuseRecycle

NEA Singapore

@NEASingapore · Post #1215 · 31.12.2025 г., 00:54

Glow-up your home with a recycling corner! Keep a bin, box or bag right beside your trash bin to make recycling effortless. ✅ Drop in only clean recyclables 🚫 Keep food scraps & oily packaging out Soon, recycling will feel like second nature! #3Rs#RecycleRight#TowardsZeroWaste#SustainableSG

ПретходнаСтраница 1 од 3Следна