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

Резултати

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

Пребарај: #reducereuserecycle

当前筛选 #reducereuserecycle清除筛选
NEA Singapore

@NEASingapore · Post #560 · 05.06.2023 г., 23:45

Getting excited over the 6.6 sales? Ask yourself if you really need the item before adding it to your cart! Consider using or repairing what you have, instead of replacing it. #ReduceReuseRecycle Check out some tips here: https://www.youtube.com/playlist?list=PLPX9rYUbMZF3GLoLkP2Bxd0TelSHylBOu

NEA Singapore

@NEASingapore · Post #55 · 20.05.2020 г., 10:00

It can be very tempting to do online shopping this circuit breaker period, but think about whether you really need it before you put it in your cart! #ReduceReuseRecycle

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 #1080 · 10.07.2025 г., 01:03

60 years of progress, but what’s next for Singapore? Higher temperatures, more wet and dry extremes, and accelerating increase in mean sea levels are projected. In the worst-case scenario, the 𝗺𝗲𝗮𝗻 𝘀𝗲𝗮 𝗹𝗲𝘃𝗲𝗹 around Singapore is projected to 𝗿𝗶𝘀𝗲 𝗯𝘆 𝟭.𝟭𝟱𝗺 𝗯𝘆 𝘁𝗵𝗲 𝗲𝗻𝗱 𝗼𝗳 𝘁𝗵𝗲 𝗰𝗲𝗻𝘁𝘂𝗿𝘆, and up to 𝗮𝗿𝗼𝘂𝗻𝗱 𝟮𝗺 𝗯𝘆 𝟮𝟭𝟱𝟬. Let’s commit to a sustainable future by taking climate actions to reduce our waste and carbon footprint. #3Rs#ReduceReuseRecycle#SG60

NEA Singapore

@NEASingapore · Post #1095 · 09.08.2025 г., 01:02

Happy 60th National Day, Singapore! 🇸🇬 As we celebrate our progress as a nation, let’s also commit to building a #SustainableSG for present and future generations. Let’s reduce our carbon footprint by taking climate actions such as adopting energy-saving and #ReduceReuseRecycle habits. #SG60#KeepSGClean

NEA Singapore

@NEASingapore · Post #645 · 18.09.2023 г., 03:31

#ProTip: There’s no need to sort your recyclables! Paper, plastic, glass, and metal can all be placed in the recycling bins ♻️✌️ But do remember to CHECK and CLEAN before you RECYCLE: www.go.gov.sg/recycleright #RecycleRight#ReduceReuseRecycle

NEA Singapore

@NEASingapore · Post #1012 · 22.03.2025 г., 01:04

Switch off for #EarthHour at 8:30pm! But let's not stop there. Let this yearly reminder inspire us to continue making sustainable choices. Your everyday choices matter more than you might think! Small steps such as adopting energy-saving habits and recycling right can make a difference. Imagine these small acts being amplified by millions worldwide. 🌍💚 #EnergyEfficiency#ReduceReuseRecycle#RecycleRight

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