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
Coronado Island 🎏
Рядом с Сан Диего расположился Coronado Island. Небольшой островок, известен дорогими отелями и пляжами
На этом пока материал с Калифорнией закончился, вернулся в родную гавань
#CA
Коллеги делятся фотографиями с Калифорнийского парка Chino Hills State Park, красота нереальная.
В этом году зимой были проливные дожди, из-за этого бум маков.
#CA
#review
#shortStory#beginning
#CA
Grabbing her wrist. Rubbing the small space between her palm and the soft skin covering her veins. Traveling to the crease of her arm. She had worked hard today. Her clients were pleased with the outcome. Each one feeling a sense of ease and comfort from the constant energy surrounding them. Some came because pain in the physical sense. Others because something deeper. More hidden and yet still calling out. It wasn’t something she had learned in text or class. It was a part of her. This unending need to draw their pain, their confusion into her core. Transform it back into something able to give them rest. Her hands were something more than flesh and her heart was more than beat. She was filled with something that could not be described, only felt. A smile crossed her lips as the gratitude filled her soul. In a world where so many were without purpose. She had found hers.
#review#CA#poetry
Love isn’t the glance of eyes that lock in time. The words spoken of passion. A need or want for embrace. Love isn’t the nostalgia one feels with reminiscing. Love isn’t the sacrifice or the control of one’s fate. It isn’t the constant knowing of place or time. The inside workings of the mind. It’s the acceptance of separation. Of knowing this path is neither yours nor mine. It’s the walking of foot steps side by side allowing the division that plays in time.
#CA#review#shortStory
Listening to the rustling of the trees. Feeling the warmth of the sun. A moment a thousand words couldn’t describe. A stillness so profound she could feel the energy beneath the ground. Stirring below her feet. A vibration that traveled through her limbs and into her soul. She sighed with relief. A smile appearing at the corners of her mouth. A light within her eyes. This was perfect. She thought of how many moments wasted. Always staying busy. Having a mindset of lack. A constant want for more. How disturbing to be in that whirlwind. Never alone yet always cut away. She wondered how many others were in this realization. This dawning of a wisdom beyond age and time. She glanced at her palms as she turned them to the sky. Feeling the wind but never seeing it, all it’s wonder and beauty. A contentment filled her as she closed her mouth only letting her thoughts become her sound speaking to the energy all around and patiently waiting for its echo from the ground.
#review#shortStory#CA
What was it that transformed her? Were people just born like this? No it was like a path that swirled within her journey. An awakening. Suffering had been her constant and chaos her normal. Her escape was her imagination, her song, her dance. The way she saw such light touch everything. Knowing she was protected even though her physical world would prove otherwise. She had a blood line but not a family. She spoke with nature. Saw herself in creatures. Believed in the impossible. It wasn’t something she did that made the difference. When trying things it always seemed like an uphill battle. When allowing things. Her life shifted. She had a realization that everything in life had its place.
Остатки рандома из Сан Диего
В прибрежной зоне часто приливы/отливы. Можно увидеть прикольную живность, которая запряталась в камнях, но должно повезти. Нам не повезло
Зато повезло почти заехать на военную базу. Если выставить в картах BMW Cabrillo National Monument, то есть шанс, что он повезёт вас не туда, хотя въезд будет очень похож. С единственным отличием - на въезде будут военные, которые вас остановят и заберут ID на проверку
Ещё оказывается в серии Книг волшебника страны Оз больше книг чем я себе представлял, а писатель Фрэнк Баум жил в Калифорнии в своём доме "Ozcot" (от "Oz" и "cottage"), где и написал большую часть серии. Первую книгу он написал живя в Чикаго
#SanDiego#CA