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

Резултати

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

Пребарај: #usefuilanguage

当前筛选 #usefuilanguage清除筛选
English From Zero to Hero

@Learn_English_from_Zero_to_Hero · Post #60507 · 16.11.2025 г., 19:02

#usefuIlanguage #useful_excerpt ☁️Using substances as a coping mechanism is like putting a band-aid on a bullet wound; it might momentarily mask the pain, but it doesn't address the root problem and often exacerbates it. 💥Put a band-aid on a bullet wound : (idiomatic, informal) To inadequately treat a serious situation. 💥Exacerbate: To make worse

English From Zero to Hero

@Learn_English_from_Zero_to_Hero · Post #60272 · 18.09.2025 г., 17:37

#usefuIlanguage #useful_excerpt ○°°°○°°°○°°°○ ◇◇◇"Oh dear, life is pretty tough sometimes, isn't it?" And Nat took his head in both hands. . . ."Very tough, but it is that very struggle with obstacles which does us good. Things have been made easy for you in many ways, but no one can do everything. You must paddle your own canoe now." ○°°○To paddle your own canoe: ☆(idiomatic) To independently make the decisions or perform the duties, tasks, etc. which are one's own responsibility and which affect oneself. ○°°°°°○°°°°○

English From Zero to Hero

@Learn_English_from_Zero_to_Hero · Post #60262 · 16.09.2025 г., 07:19

#SpokenEnglish #usefuIlanguage 💥"I'm only razzing you!" ⚡️This phrase is often used in informal contexts to indicate that someone is joking or teasing another person in a playful manner. It suggests that the teasing is not meant to be taken seriously or to hurt feelings. ⚡️If a friend playfully mocks your choice of movie, you might respond with, "Oh, come on! I'm only razzing you!" 💥 "You do you!" ⚜This expression is a way of encouraging someone to be themselves and to pursue their own interests, choices, or lifestyle without worrying about what others think. It promotes individuality and self-acceptance. ⚡️If someone is hesitant about wearing an unconventional outfit, you might say, "Hey, if you like it, you do you!" 💥"The credits roll, but the story lingers." ⚜This phrase suggests that even after an event has concluded (like a movie ending with credits), the impact or essence of the experience continues to resonate or affect people. It implies that stories, emotions, or lessons learned endure beyond their immediate context. ⚡️ After finishing a powerful film, you might reflect, "The credits roll, but the story lingers in my mind long after."