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

Резултати

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

Пребарај: #infinityx

当前筛选 #infinityx清除筛选
Xiaomi 12T Pro | K50U | Updates

@xiaomi_12tpro_updates · Post #327 · 09.05.2025 г., 01:45

#InfinityX#qpr2#Diting#A15 Project InfinityX - v2.8 | Android 15 Released: 8/05/2025 ▪️Gapps: Gdrive ▪️Vanilla: Gdrive ▪️Recovery: Ofox ▪️Screenshots Notes: It is recommended to use ofox recovery if you are flashing via fastboot. fastboot flash recovery_ab recovery.img Changelogs: • Synchronized with the latest changes • Device integrity passes (signed build) • fixed the problem with freezing when the battery reaches 5%? • KernelSU Support • Firmware included • Dolby Audio by default • HyperOS Camera by default Credits: Thanks to @TeamMEX_XDA❤️ Thanks to @zED141 for giving me space on gdrive By@Jezzay97 | Donate Follow@xiaomi_12tpro_updates Join@xiaomi12tpro_chat

Xiaomi 12T Pro | K50U | Updates

@xiaomi_12tpro_updates · Post #323 · 03.05.2025 г., 20:09

#InfinityX#qpr2#Diting#A15 Project InfinityX - v2.7 HotFix | Android 15 Released: 3/05/2025 ▪️Gapps: Mirror | Gdrive ▪️Vanilla: Mirror | Gdrive ▪️Recovery: Ofox ▪️Screenshots Notes: It is recommended to use ofox recovery if you are flashing via fastboot. fastboot flash recovery_ab recovery.img Changelogs: • Synchronized with the latest changes • Device integrity passes (signed build) • Fixed the error when installing gapps due to missing partition. • Slot 2 problem for Sim cards solved • Firmware included • Dolby Audio by default • HyperOS Camera by default • and many more changes... Credits: Thanks to @TeamMEX_XDA❤️ Thanks to @zED141 for giving me space on gdrive By@Jezzay97 | Donate Follow@xiaomi_12tpro_updates Join@xiaomi12tpro_chat

Xiaomi 12T Pro | K50U | Updates

@xiaomi_12tpro_updates · Post #321 · 03.05.2025 г., 07:32

#InfinityX#qpr2#Diting#A15 Project Infinity X - v2.7 | Android 15 Released: 3/05/2025 ▪️Gapps: Mirror | SF ▪️Vanilla: Mirror | SF ▪️Screenshots Notes: • Synchronized with the latest changes • Device integrity passes (signed build) • Thermal menu was removed for now • Remove some ARM blobs • Now with oss kernel • Fixed some vibration bugs. now works 100%. • Added KernelSU support • Improved performance • Firmware included • Dolby Audio by default • HyperOS Camera by default • and many more changes... Credits: Thanks to @TeamMEX_XDA❤️ By@Jezzay97 | Donate Follow@xiaomi_12tpro_updates Join@xiaomi12tpro_chat

Xiaomi 12T Pro | K50U | Updates

@xiaomi_12tpro_updates · Post #314 · 20.04.2025 г., 04:56

#InfinityX#qpr2#Diting#A15 Project Infinity X - v2.7 | Android 15 Released: 20/04/2025 ▪️Download: Mirror | SF ▪️Screenshots Notes: • Synchronized with the latest changes • Device integrity passes (signed build) • Workaround for voip audio routing issue using a monitoring service (Whatsapp calls on speakerphone fixed) • Firmware included and updated • Gapps build only • Dolby Audio by default • HyperOS Camera by default By@Jezzay97 | Donate Follow@xiaomi_12tpro_updates Join@xiaomi12tpro_chat

Xiaomi 12T Pro | K50U | Updates

@xiaomi_12tpro_updates · Post #312 · 17.04.2025 г., 17:36

#InfinityX#qpr2#Diting#A15 Project Infinity X - v2.7 | Android 15 Released: 17/04/2025 ▪️Download: Mirror | SF ▪️Screenshots ▪️Changelog Notes: • Synchronized with the latest changes • Device integrity passes (signed build) • Gapps build only • Dolby Audio by default • HyperOS Camera by default By@Jezzay97 | Donate Follow@xiaomi_12tpro_updates Join@xiaomi12tpro_chat

Xiaomi 12T Pro | K50U | Updates

@xiaomi_12tpro_updates · Post #308 · 13.04.2025 г., 06:08

#InfinityX#qpr2#Diting#A15 Project Infinity X - v2.7 | Android 15 Released: 13/04/2025 ▪️Download: Mirror | SF ▪️Screenshots ▪️Changelog Notes: • Device integrity passes (signed build) • Gapps build only • Dolby Audio by default • HyperOS Camera by default By@Jezzay97 | Donate Follow@xiaomi_12tpro_updates Join@xiaomi12tpro_chat

Oneplus 13 Updates

@OnePlus13Series · Post #386 · 05.05.2026 г., 16:37

Project InfinityX v3.10 - Official | Android 16 | OnePlus 13 ‼️ ARB ‼️ ⬇️ Download: Here ✏️ Flashing Instructions: Here 📸 Screenshots: Here 📝 Device Changelogs: Here 05/05/2026 - Synced with latest source - Initial official release 📝 Source Changelogs: Here 👤 Maintainer: @Whyred_404 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom 🔖 Tags: #development#rom#infinityX#official

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #483 · 05.12.2024 г., 19:24

Project Infinity X - Official | A15| Nothing Phone 2 (Pong) 📝 Details: - Version: v2.2 - Device: #Pong - Released: 06/12/24 ⬇️ Download: Here 📖 Changelogs: Device | Source 📔 Instructions: Here 🎄 Device tree : Here 🖼 Screenshot : here 🆘 Support: Device 🏷 Tags: #AOSP#ROM#InfinityX#U#Official ✍️ Note: • Initial Android 15 • Clean flash recommended • Base firmware 2.6.0 is recommended • Dolby Atmos available • ksu patched 🏆 Credits: - Chandu Dyavanapelli for DT Base - Fabian and Hellboy for Glyph Implementation 👤 Maintainer: @Ghosutox 🔔 Updates: @NothingPhone2Updates 🐙 Chat: @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #699 · 14.12.2025 г., 04:25

Project Infinity X - Official | A16 | Nothing Phone 2 (Pong) (EOL) 📝 Details: - Version: v3.5 (EOL) - Device: #Pong - Released: 13/12/'25 ⬇️ Download: Here 📖 Changelogs: Device | Source 📔 Instructions: Here 🖼 Screenshot : Here 🆘 Support: Device 💰 Donation: steinsgate007@axl | BMC 🏷 Tags: #AOSP#ROM#InfinityX#V#Official ✍️ Note: • Base firmware 4.0 is recommended • If face any bugs report with logs • Dolby and initial Nothing camera support available • ksu not prepatched 🏆 Credits: - Hellboy for kernel - Fabian and Hellboy for Glyph Implementation 👤 Maintainer: @Ghosutox 🔔 Updates: @NothingPhone2Updates 🐙 Chat: @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #687 · 21.10.2025 г., 04:43

Project Infinity X - Official | A16 | Nothing Phone 2 (Pong) 📝 Details: - Version: v3.3 - Device: #Pong - Released: 20/10/'25 ⬇️ Download: Here 📖 Changelogs: Device | Source 📔 Instructions: Here 🖼 Screenshot : Here 🆘 Support: Device 💰 Donation: steinsgate007@axl | BMC 🏷 Tags: #AOSP#ROM#InfinityX#V#Official ✍️ Note: • Base firmware 3.2 is recommended • Clean flash recommended • If face any bugs report with logs • Dolby and initial Nothing camera support available • WFD broken • ksu pre-patched 🏆 Credits: - Hellboy for kernel - Fabian and Hellboy for Glyph Implementation 👤 Maintainer: @Ghosutox 🔔 Updates: @NothingPhone2Updates 🐙 Chat: @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #676 · 22.09.2025 г., 09:25

Project Infinity X - Official | A16 | Nothing Phone 2 (Pong) 📝 Details: - Version: v3.2 - Device: #Pong - Released: 22/09/'25 ⬇️ Download: Here 📖 Changelogs: Device | Source 📔 Instructions: Here 🖼 Screenshot : Here 🆘 Support: Device 💰 Donation: steinsgate007@axl | BMC 🏷 Tags: #AOSP#ROM#InfinityX#V#Official ✍️ Note: • Base firmware 3.2 is recommended • If face any bugs report with logs • Dolby and initial Nothing camera support available • WFD broken • ksu pre-patched 🏆 Credits: - Hellboy for kernel - Fabian and Hellboy for Glyph Implementation 👤 Maintainer: @Ghosutox 🔔 Updates: @NothingPhone2Updates 🐙 Chat: @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #659 · 10.08.2025 г., 18:37

Project Infinity X - Official | A16 | Nothing Phone 2 (Pong) 📝 Details: - Version: v3.1 - Device: #Pong - Released: 10/08/'25 ⬇️ Download: Here 📖 Changelogs: Device | Source 📔 Instructions: Here 🖼 Screenshot : Here 🆘 Support: Device 💰 Donation: steinsgate007@axl | BMC 🏷 Tags: #AOSP#ROM#InfinityX#V#Official ✍️ Note: • Base firmware 3.2 is recommended • If face any bugs report with logs • Dolby and initial Nothing camera support available • WFD broken • ksu pre-patched 🏆 Credits: - Hellboy for kernel - Fabian and Hellboy for Glyph Implementation 👤 Maintainer: @Ghosutox 🔔 Updates: @NothingPhone2Updates 🐙 Chat: @NothingPhone2

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