@inpdf · Post #7727 · 18.05.2026 г., 12:15
Champions #League All Stars - 2nd Ed. 🇬🇧 UK May 2026 #sport ⤵️@inPDF📬
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
Пребарај: #league
@inpdf · Post #7727 · 18.05.2026 г., 12:15
Champions #League All Stars - 2nd Ed. 🇬🇧 UK May 2026 #sport ⤵️@inPDF📬
@tonevents_en · Post #1025 · 27.11.2024 г., 10:11
🔔The New Year season of the Open League begins! 7th Season of The Open League starts today at 11:00 UTC. Anyone who wants to participate needs to get their #DeFi badges and read the terms of the rewards. The main focus of this season is liquidity💧 The season will last 20 days (from November 27 to December 17). The prize fund is $1.5M. The maximum reward for a participant is $1,000. Points can be earned in two categories: provided liquidity (TVL) and conducted trading turnover (Volume). The user's total points are the sum of the two categories. 💱Volume Points in this category are added for every $20 spent through League member projects. The dollar amount is calculated at the time of the exchange. ✔️GasPump — 5 points ✔️BigPump — 5 points ✔️Blum Mempad — 5 points ✔️TONPump — 5 points ✔️Wagmi — 5 points ✔️swap.coffee — 1 point ✔️Rainbow Swap — 1 point 🔒Liquidity | TVL Points in this category are added for every $20 invested in the liquidity of the sites that participate in the league. The dollar amount is calculated based on the value of the tokens at the end of the season. ✔️DAOLama — 15 points ✔️Aqua protocol — 15 points ✔️TonStable — 15 points ✔️TONCO — 10 points ✔️Coffin — 10 points ✔️JVault — 10 points ✔️Parraton — 10 points ✔️SettleTON — 10 points ✔️TonPools — 10 points ✔️TON Hedge — 10 points ✔️swap.coffee — 10 points for staking If you want to know how to get the most out of the season, join our chat for League tips. Leave your questions in the comments below this post. Get your badge now!🎁 #TON#SBT#AirDrop#League
@TFGames · Post #1794 · 02.01.2024 г., 09:25
#FEL#LEAGUE#GAMES https://testflight.apple.com/join/dzYEhXYw
@TestFlightX · Post #34760 · 01.12.2024 г., 10:16
#MONSTER#LEAGUE#FANTASY https://testflight.apple.com/join/7pBNJgK3
@TFGames · Post #2171 · 16.02.2024 г., 19:06
#RUMBLE#KONG#LEAGUE#GAMES https://testflight.apple.com/join/FKHsFUMi
@testflightynoti · Post #38088 · 12.05.2026 г., 18:35
#Zeebra#League#amp#Rankings Join the Zeebra - League & Rankings beta on ✈️#TestFlight 🔗 Link: https://testflight.apple.com/join/aSvp2czv Shared by Dimitri
@KartInfoTW · Post #294 · 09.10.2021 г., 08:16
今晚五點,韓服 2021 跑跑聯賽第二季總決賽開打! 團體賽是文浩俊經營的戰隊「BLADES」對上循環賽一場都沒輸過但準決賽輸給 BLADES 的「Liiv SANDBOX」,個人賽則是有柳昌賢、朴仁秀和李載赫等多位明星選手登場,相信這次決賽肯定會相當精采 🔥 🏁 聯賽資訊/獎勵:https://kinf.cc/aSKLe ▶️ 追蹤 Google 新聞:https://kinf.cc/gn ▶️ 立即加入 Discord:https://kinf.cc/dc #跑跑卡丁車#KartRider#韓服#聯賽#跑跑聯賽#League#冠軍賽#總決賽