TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #32 · 7 фев.

Скорее всего уже слышали, что складывать строки через + это плохая практика. Падение производительности, и всё такое. Без лишних слов, давайте измерять: from timeit import timeit def t1(): # складываем 10 строк через + из переменной t = 'text' for _ in range(1000): s = t + t + t + t + t + t + t + t + t def t2(): # склеиваем список строк через метод join arr = ['text'] * 10 for _ in range(1000): s = ''.join(arr) def t3(): # складываем через + но не из переменной а непосредственно инлайн объекты for _ in range(1000): s = 'text' + 'text' + 'text' + ... # всего 10 раз Теперь каждую строку склейки запустим по 10М раз >>> timeit(t1, number=10000) 0.21951690399964718 >>> timeit(t2, number=10000) 1.4978306379998685 >>> timeit(t3, number=10000) 0.2213820789993406 Хм, а нам говорили что через "+" это плохо и медленно ))) 😁 Тут стоит учитывать, что речь идёт о склейке множества длинных строк. Давайте изменим условия: def t4(): t = 'text'*100 for _ in range(1000): s = t + t + t + t + t + t + t + t + t def t5(): arr = ['text'*100] * 10 for _ in range(1000): s = ''.join(arr) def t6(): for _ in range(1000): s = 'text'*100 + 'text'*100 + ... # всего 10 раз >>> timeit(t4, number=10000) 12.795130728000004 >>> timeit(t5, number=10000) 2.642637542999182 >>> timeit(t6, number=10000) 0.2184546610005782 Вот, уже другой разговор, сразу видна разница, в среднем в 6 раз. Но погодите, почему последний тест t6() по скорости такой же как и t3()? Ведь строки теперь в 100 раз длиннее! Это вопросы оптимизации кода, какие простые изменения ускоряют или замедляют выполнение программы. Мы столкнулись с примером обхода обращения к переменной. Например, именно так работает директива #define в С++, во время компиляции подставляя значение переменной вместо ссылки на неё. В Python это тоже работает, но часто ли вы сможете встретить такой способ работы со строками? К сожалению, способ почти только теоретический. В целом, тесты показали то, что мы хотели. Делаем выводы самостоятельно. Полный листинг 🌍 #tricks

Резултати

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

Пребарај: #baklava

当前筛选 #baklava清除筛选
Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #713 · 13.02.2026 г., 04:29

Lineage OS - Official | Android 16 | Nothing Phone (2) ✍️ Details: - Version: 23.2 - Codename: #Pong - Initial Build: 10/02/26 - Build Freq: Weeklies (Search for #Pong) 🔽 Download: ROM & Images | GAPPS (sideload) | Unofficial MicroG Builds ⚙️ Wiki: Here 📔 Changelogs: Here 🤝 CF Participants: Here | Ref 🔖 Tags: #ROM#LOS#Official#Baklava#Vanilla ❌ Known quirks: - Device Integrity ~ As always thanks Goolag! 👤 Dev: chandu078 🐙 Chat: @NothingPhone2 🔔 Updates: @NothingPhone2Updates

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #740 · 06.05.2026 г., 07:29

Paranoid Android - Unofficial | Android 16 | Nothing Phone (2) 📔Details: • Version: Beryl (Alpha) • Device: #Pong • Updated: 13/05/26 🔽 Download: Here | Sideload 🆘 Bug Reports: Here 🔖Tags: #AOSPA#Unofficial#Baklava#CLO#NothingPhone2#Beryl ✨ Changelogs - Fixed upstream tethering apex failing to boot - Improvements to performance and system stability ⚙️Installation: 1. fastboot flashing unlock_critical (skip if already unlocked) 2. Execute this for flashing the ROM: fastboot -w fastboot update path/to/aospa zip 3. Wait for boot to finish ✍️ Note: - Firmware is included. No need to flash seperately. - Clean flash is recommended 👤 Dev: @gotenksIN 🔔Updates : @NothingPhone2Updates 💬Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #736 · 02.05.2026 г., 05:06

Paranoid Android - Unofficial | Android 16 | Nothing Phone (2) 📔Details: • Version: Beryl (Alpha) • Device: #Pong • Updated: 04/05/26 🔽 Download: Here 🆘 Bug Reports: Here ✨ Changelogs: Here 🔖Tags: #AOSPA#Unofficial#Baklava#CLO#NothingPhone2#Beryl ⚙️Installation: 1. fastboot flashing unlock_critical (skip if already unlocked) 2. Execute this for flashing the ROM: fastboot -w fastboot update path/to/aospa zip 3. Wait for boot to finish ✍️ Note: - Firmware is included. No need to flash seperately. - Clean flash is recommended 👤 Dev: @gotenksIN 🔔Updates : @NothingPhone2Updates 💬Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #700 · 19.12.2025 г., 14:30

Paranoid Android - Unofficial | Android 16 | Nothing Phone (2) 📔Details: • Version: Beryl (Alpha) • Device: #Pong • Updated: 19/12/25 🔽 Download: Here 🆘 Bug Reports: Here 🔖Tags: #AOSPA#Unofficial#Baklava#CLO#NothingPhone2#Beryl ✨Changelogs: - Based on current QSSI16 and V4.0-251119-1654 - Improvements to performance and system stability - While feedback is appreciated, please do not explicitly mention me, I can read chat on my own thanks ⚙️Installation: 1. fastboot flashing unlock_critical (skip if already unlocked) 2. Execute this for flashing the ROM: fastboot -w fastboot update path/to/aospa zip 3. Wait for boot to finish ❗️Known bugs: - UW camera does not show up in aperture - Left volume panel isn't aligned in landscape ✍️ Note: - Firmware is included. No need to flash seperately. - Clean flash is recommended 👤 Dev: @gotenksIN 🔔Updates : @NothingPhone2Updates 💬Chat : @NothingPhone2

Oneplus 13 Updates

@OnePlus13Series · Post #383 · 07.04.2026 г., 14:25

DerpFest - Official | Android 16 | Oneplus 13 ✍️ Details: - Version: 16 - Codename: #dodge - Variant: #Gapps - Released: 07/04/26 🔽 Download : Sourgeforge | Mirror 🔖 Tags: #Derpfest#Official#Baklava#ROM#dodge ⚙️Flashing Instructions: - Using SuperHybrid Flasher (recommended) - It also can be flashed through Ofox recovery. ✍️Notes: - GApps Included, do not flash again - April Security Patch (QPR2) - Lineage Upstream - Upstreamed kernel - FW 16.0.5.701 ARB !!! - Don't report without proper logs! 🏆Credits: - Chandu_078 - bgcngm - jonassalo93 - danielspringer - jakobBokaj1 - Testers 👤 Maintaner: @einargednochsson 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Oneplus 13 Updates

@OnePlus13Series · Post #379 · 08.03.2026 г., 18:36

DerpFest - Official | Android 16 | Oneplus 13 ✍️ Details: - Version: 16 - Codename: #dodge - Variant: #Gapps - Released: 08/03/26 🔽 Download : Sourgeforge | Mirror 🔖 Tags: #Derpfest#Official#Baklava#ROM#dodge ⚙️Flashing Instructions: - Using SuperHybrid Flasher (recommended) - It also can be flashed through Ofox recovery. ✍️Notes: - GApps Included, do not flash again - March Security Patch (QPR2) - Lineage Upstream - Reworked kernel - FW 16.0.3.501 ARB !!! - Don't report without proper logs! 🏆Credits: - Chandu_078 - bgcngm - @jonassalo93 - @danielspringer - @jakobBokaj1 - Testers 👤 Maintaner: @einargednochsson 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Oneplus 13 Updates

@OnePlus13Series · Post #376 · 13.02.2026 г., 20:34

DerpFest - Official | Android 16 | Oneplus 13 ✍️ Details: - Version: 16 - Codename: #dodge - Variant: #Gapps - Released: 13/02/26 🔽 Download : Sourgeforge | Mirror 🔖 Tags: #Derpfest#Official#Baklava#ROM#dodge ⚙️Flashing Instructions: - Using SuperHybrid Flasher (recommended) - It also can be flashed through Ofox recovery. ✍️Notes: - GApps Included, do not flash again - February Security Patch (QPR2) - FW 16.0.3.501 ARB !!! - Don't report without proper logs! 🏆Credits: - Chandu_078 - bgcngm - @jonassalo93 - @danielspringer - @jakobBokaj1 - Testers 👤 Maintaner: @einargednochsson 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Oneplus 13 Updates

@OnePlus13Series · Post #362 · 13.12.2025 г., 18:07

DerpFest - Official | Android 16 | Oneplus 13 ✍️ Details: - Version: 16 - Codename: #dodge - Variant: #Gapps - Released: 13/12/25 🔽 Download : Sourgeforge | Mirror 🔖 Tags: #Derpfest#Official#Baklava#ROM#dodge ⚙️Flashing Instructions: - Using SuperHybrid Flasher (recommended) - Without SuperHybrid Flasher - It also can be flashed through Ofox recovery. ✍️Notes: - GApps Included, do not flash again - December Security Patch - Updated kernel - Don't report without proper logs! 🏆Credits: - Chandu_078 - bgcngm - @jonassalo93 - @danielspringer - @jakobBokaj1 - Testers 👤 Maintaner: @einargednochsson 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Oneplus 13 Updates

@OnePlus13Series · Post #357 · 29.11.2025 г., 08:02

DerpFest - Official | Android 16 | Oneplus 13 ✍️ Details: - Version: 16 - Codename: #dodge - Variant: #Gapps - Released: 26/11/25 🔽 Download : Sourgeforge | Mirror 🔖 Tags: #Derpfest#Official#Baklava#ROM#dodge ⚙️Flashing Instructions: - Using SuperHybrid Flasher (recommended) - Without SuperHybrid Flasher - It also can be flashed through Ofox recovery. ✍️Notes: - GApps Included, do not flash again - November Security Patch - A16 blobs/kernel - Don't report without proper logs! 🏆Credits: - Chandu_078 - bgcngm - @jonassalo93 - @danielspringer - @jakobBokaj1 - Testers 👤 Maintaner: @einargednochsson 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Oneplus 13 Updates

@OnePlus13Series · Post #353 · 13.11.2025 г., 15:53

DerpFest - Official | Android 16 | Oneplus 13 ✍️ Details: - Version: 16 - Codename: #dodge - Variant: #Gapps - Released: 12/11/25 🔽 Download : Sourgeforge | Mirror 🔖 Tags: #Derpfest#Official#Baklava#ROM#dodge ⚙️Flashing Instructions: - Using SuperHybrid Flasher (recommended) - Without SuperHybrid Flasher - It also can be flashed through Ofox recovery. ✍️Notes: - GApps Included, do not flash again - November Security Patch - Don't report without proper logs! 🏆Credits: - Chandu_078 - bgcngm - @jonassalo93 - @danielspringer - @jakobBokaj1 - Testers 👤 Maintaner: @einargednochsson 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Oneplus 13 Updates

@OnePlus13Series · Post #387 · 14.05.2026 г., 07:57

Pixel OS - Unofficial | Android 16 | Oneplus 13 ✍️ Details: - Version: 16.2 - Codename: #dodge - Variant: #Gapps - Released: 26/05/14 🔽 Download 🔖 Tags: #PixelOS#Unofficial#ROM#dodge#Baklava ✍️ Notes: ❗❗❗ARB❗❗❗ - Try to fix ltpo - Bring high touch polling rate - Bring back BThelper - Sync Pixel OS upstream updates. 🏆 Credits: - Chandu_078 & bgcngm for base DT - einargednochsson & Daniel & jjpprrrr & Jonas Salo - And everyone who contributed to the OnePlus 13 open-source ROM. 👤 Maintainer: @likw233 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Oneplus 13 Updates

@OnePlus13Series · Post #385 · 13.04.2026 г., 05:12

Pixel OS - Unofficial | Android 16 | Oneplus 13 ✍️ Details: - Version: 16.2 - Codename: #dodge - Variant: #Gapps - Released: 26/04/13 🔽Download 🔖 Tags: #PixelOS#Unofficial#ROM#dodge#Baklava ✍️ Notes: ❗❗❗ARB❗❗❗ - Add freedom from crd - Sync Pixel OS upstream updates. 🏆 Credits: - Chandu_078 & bgcngm for base DT - einargednochsson & Daniel & jjpprrrr & Jonas Salo - And everyone who contributed to the OnePlus 13 open-source ROM. 👤 Maintainer: @likw233 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

ПретходнаСтраница 1 од 3Следна