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
🪐 The galaxy cluster CLASH J0152.7-1357, observed by both Hubble and ground-based telescopes, contains vast amounts of dark matter—an invisible substance revealed only by its powerful gravitational pull on galaxies and hot gas. Despite being undetectable by any normal telescope, dark matter outweighs the visible content in CLASH J0152.7-1357, shaping the cluster and allowing scientists to map where this mysterious material gathers in the cosmos. ✨
#darkmatter⚡#galaxycluster⚡#cosmos⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The galaxy cluster MACS J0416.1-2403 is held together by enormous amounts of dark matter—an invisible substance that does not emit or reflect light, but adds enough gravity to bind thousands of galaxies and clouds of hot gas. Observations show that the visible matter in MACS J0416.1-2403 makes up only a small fraction of the total mass, highlighting how most of the cluster’s true weight comes from this mysterious, unseen ingredient shaping the universe on the largest scales. ✨
#darkmatter⚡#galaxycluster⚡#mysteries⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The galaxy cluster CL0024+17, located about 5 billion light-years away, has helped scientists visualize dark matter using a phenomenon called gravitational lensing—where the cluster's gravity bends the light from even more distant galaxies and creates giant arcs in the sky. This invisible "scaffolding" of dark matter shapes the cluster's structure and reveals mysterious regions that emit no light but hold enormous mass, showing the universe is built on something we still cannot see. ✨
#darkmatter⚡#galaxycluster⚡#mysteries⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 In the galaxy cluster El Gordo, astronomers have observed evidence that most of its mass is not from visible matter but from dark matter—a mysterious, invisible substance that outweighs all the galaxies and gas combined. Detailed gravitational lensing (where gravity bends and magnifies the light from more distant galaxies) reveals vast, hidden regions in El Gordo, confirming that dark matter acts as a cosmic glue, binding this colossal cluster together and shaping its structure on a grand scale. ✨
#darkmatter⚡#lensing⚡#galaxycluster⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 Scientists studying the distant galaxy cluster MACS J1149+2223 use it as a window into the fate of the cosmos, tracking how the accelerated expansion driven by dark energy might eventually push galaxies so far apart that their light can never reach each other again. Over unimaginable timescales, clusters like MACS J1149+2223 will fade from view as the universe expands, leaving behind only a cold, dark emptiness—an ending known as "cosmic isolation" that awaits even the brightest galaxies. ✨
#universe⚡#expansion⚡#darkenergy⚡#galaxycluster⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 Within the distant galaxy cluster MACS J1423.8+2404, astronomers have measured the effects of dark energy—a mysterious force causing the universe to expand faster and faster over time. By studying how galaxies in this cluster are drifting apart, scientists collect real-world evidence that dark energy acts like a kind of "anti-gravity," pushing the vast cosmic web ever outward and shaping the fate of everything we see in the universe. ✨
#darkenergy⚡#galaxycluster⚡#expansion⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 In the galaxy cluster Abell 3827, astronomers have observed four galaxies merging and spotted what may be the first hints that dark matter—an invisible substance shaping the cosmos—can interact with itself beyond just gravity. By watching how dark matter halos (the unseen envelopes around galaxies) seem to lag behind their stars during the collision, scientists are piecing together clues about this mysterious material that outweighs all ordinary matter in the universe. ✨
#darkmatter⚡#abell3827⚡#galaxycluster⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries