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
#Vocabulary
🕸Dormant
🦦 (of an animal) having normal physical functions suspended or slowed down for a period of time; in or as if in a deep sleep
🫧 Ex:- During the winter months, the bears will often go dormant and hibernate.
🌨Basic Synonyms
🌓 asleep
🌓 slumbering
🌓 inactive
🌟Advanced Synonyms
✨ comatose
✨ supine
✨ lethargic
✨ torpid
✨ aestivating
🌔Antonyms
🍀 awake
🍀 wakeful
#Vocabulary
🎶Repertory2⃣
🎼a collection, especially of music or information
🎻 Ex:- This year, the Boston Philharmonic has expanded its repertory to include compositions from Mexico.
🎸Basic Synonyms
collection
#Vocabulary
🎨Repertory1⃣
🎭 the performance of various plays, operas, or ballets by a company at regular short intervals
Ex:- Martin was overjoyed when he learned his audition was good enough to get him accepted at the New York Repertory for Young Composers.
❄️Basic Synonyms
🫧 theater
🫧 troupe
🫧 school
#Vocabulary
📜 Screed
📝a long speech or piece of writing, typically one regarded as tedious
✍Example:-
When they lost the match, the team coach launched into an almost incoherent screed on all the areas the team had to improve in.
📒Basic Synonyms
🖌 rant
📔Advanced Synonyms
🖍 harangue
#Vocabulary
🥢Palatable
🍽(of food or drink)
pleasant to taste; has acceptable taste
🍴Example:-
Tonight, a surprisingly palatable spread will be laid out on the table. Don't be shy — come.
🧉Basic Synonyms
🥤 tasty
🥤 eatable
🍹Advanced Synonyms
🧋 appetizing
🧋 edible
🧋 savoury
🧋 delectable
🧋 luscious
🧋 flavourful
🧃Antonyms
🫗 distasteful
🫗 unsavoury
#Vocabulary
💡Mellifluous
/məˈlɪflu.əs/, /mɛˈlɪflu.əs/
⚜Sweet or musical; pleasant to hear.
💥Her mellifluous voice captivated the audience during her performance.
#Vocabulary
🔸Cacophony
⚜A harsh, discordant mixture of sounds.
💥 The cacophony of honking cars and
shouting pedestrians filled the streets of the busy city.
#Vocabulary
🌺Diffident.
●Lacking or marked by a lack of self-confidence; shy and timid, distrustful of one's own powers.
●He was diffident about his own success.
●Because she was only a first-year student, she was diffident when offering a comment on the professor's lecture.
#Vocabulary
🌺Spurious
/ˈspjʊəriəs/ 《adjective》
●a spurious statement, argument etc is not based on facts or good thinking and is likely to be incorrect.
▪️He demolished the opposition’s spurious arguments.