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
High Protein Wan Tan
Ingredients:
For the dough:
- 250 g flour 🌾
- 1 tsp salt 🧂
- 100 ml warm water 💧
For the filling:
- 1 cm ginger 🫚
- 100 g soy granules 🌱
- 2 spring onions 🧅
- 2 cloves of garlic 🧄
- 3 mushrooms 🍄
- 1 carrot 🥕
- 4 tbsp soy sauce 🧴
- 1 tbsp starch 🌿
Additionally:
- oil for frying 🛢️
- 100 ml water for steaming 💦
#HighProtein#WanTan#HealthyEating#Vegan
@dishes
High Protein Vegetable Patties
🥕 Ingredients:
- 1 small carrot 🥕
- 1 medium potato 🥔
- 1/2 bell pepper 🌶
- 1 onion 🧅
- 50 g soy granules 🌱
- 50 g corn 🌽
- 50 ml water 💧
- 100 g flour 🌾
- 1 tbsp starch ✨
- Oil for frying 🍳
Preparation:
1️⃣ Grate the carrot & potato, dice the pepper & onion, and place in a bowl 🥣
2️⃣ Soak the soybean granules in water, then add to the bowl along with the remaining ingredients and mix well 👩🍳
3️⃣ Shape the dough into patties and sauté in a pan with a little oil until golden brown 🥘
Enjoy! 😋
#HighProtein#VegetablePatties#VeganRecipe#HealthyEating#PlantBased
@dishes
High Protein Vegetable Patties
🥕 Ingredients:
- 1 small carrot 🥕
- 1 medium potato 🥔
- 1/2 bell pepper 🌶️
- 1 onion 🧅
- 50 g soy granules 🌱
- 50 g corn 🌽
- 50 ml water 💧
- 100 g flour 🌾
- 1 tbsp starch ✨
- Oil for frying 🍳
Preparation:
1️⃣ Grate the carrot & potato, dice the pepper & onion, and place in a bowl 🥣
2️⃣ Soak the soybean granules in water, then add to the bowl along with the remaining ingredients and mix well 👩🍳
3️⃣ Shape the dough into patties and sauté in a pan with a little oil until golden brown 🥘
Enjoy! 😋
#HighProtein#VegetablePatties#VeganRecipe#HealthyEating#PlantBased
@dishes
High Protein Zucchini Frittata 🥒🍅
Ingredients:
• 450 g chickpea flour 🌱
• 800 ml water 💧
• 1 zucchini 🥒
• 10 cherry tomatoes 🍅
• 2 onions 🧅
• 1 tsp turmeric 🌞
• 1 tsp Kala Namak 🧂
• 1 tsp paprika powder 🌶️
• Pinch of salt & pepper 🧂
Toppings:
• Cherry tomatoes 🍅
• Onion rings 🧅
• Italian herbs 🌿
Preparation:
1️⃣ Mix chickpea flour with water and season 🌱
2️⃣ Add vegetables and let rest for 10 minutes ⏳
3️⃣ Heat some oil in a pan and add the mixture; decorate with toppings 🥄
4️⃣ Cover and cook on low heat for 20 minutes 🔥⏳
#FrittataTime#HighProtein#ZucchiniRecipe#VeganDelight#HealthyEating#PlantBasedCooking
@dishes
High Protein Sweet & Sour Udon Noodles 🍜💪
Ingredients:
- 250 g udon noodles 🍜
- 80 g pea or soy medallions 🌱 (vegetable broth)
- 2 carrots 🥕
- 100 g sugar snap peas 🍃
- 200 g mushrooms 🍄
- 1/2 bunch of spring onions 🧅
Sauce:
- 2 tbsp sesame oil 🌾
- 1 tbsp soy sauce 🧂
- 3 tbsp agave syrup 🍯
- 2 tbsp rice vinegar 🍚
- 50 ml pasta water (from the udon noodles) 💧
- 1 tsp sesame seeds 🌿
- 1 tsp chili flakes 🌶️
Instructions:
1. Cook udon noodles in boiling water as per instructions. Save 50 ml of pasta water. 🍲
2. In vegetable broth, cook soy or pea medallions until tender. 🥄
3. Slice carrots, sugar snap peas, mushrooms, and spring onions. 🍄🥕🍃
4. Heat sesame oil in a pan, add veggies, and stir-fry until tender-crisp. 🍳
5. Add soy sauce, agave, rice vinegar, pasta water, sesame seeds, and chili flakes to the pan. 🍶
6. Combine everything, serve, and enjoy! 😋
#SweetAndSourNoodles#HighProtein#PlantBased#UdonLove#HealthyEats#VeganNoodles#QuickMeals#FoodieFun
@dishes
High Protein Red Cabbage Rolls
Ingredients:
🥬 1 large red cabbage
🫚 4 cm ginger
🧄 3 cloves of garlic
🥕 2 carrots
🫑 2 peppers
🧅 2 spring onions
🌱 100 g soy granules
🍶 50 ml soy sauce
Toppings:
✨ Sesame, 🌿 fresh parsley, 🌶 chili flakes
Dip:
🍯 Sweet Chili Sauce
#HighProtein#RedCabbageRolls#HealthyEating#PlantBased#EasyRecipe#SoyGranules#VeggiePower#Flavorful#MealPrep
@dishes