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

Резултати

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

Пребарај: #reminder

当前筛选 #reminder清除筛选
KOPI HITAM DAO ☕️

@uangdrop · Post #44700 · 04.05.2026 г., 12:39

#Reminder CAPX Airdrop Unlock 3.0 The 3nd unlock (40%) of the Capx Airdrop is now LIVE. Please claim your Airdrop allocations Link : https://app.capx.ai/airdrop-claim

Hashtags

ALPHA GUILD 🛡️

@onlyalphasignals · Post #12386 · 11.03.2026 г., 07:50

#Reminder Invent Money - Earn $INVENT Token - SignUp with Email & Verify - Set your Username - Collect Rewards - Complete All Task - Done 100% Unlocked at TGE

Hashtags

Airdrop Ninja™

@airdropsalertteam · Post #9286 · 20.02.2024 г., 09:46

#reminder 🚨Airdrop: James Coin✅️ 🔥 Total Rewards: 25,000,000 $JAMES 🤑Refer: Top 20 Referrers will receive 250,000 $JAMES Each 🛃Website:https://jamescoin.io/ 🚧Rating: ⭐️⭐️⭐️⭐️⭐️ 📛 Winners: 2000 Random + Top 20 Referrers 🤖Airdrop Link :https://t.me/JamesCoinAirdropBot =========================== 📝 Guide: 🔘 Start the Airdrop Bot 🔘 Complete all Tasks 🔘 Submit your SOL (Solana) Wallet =========================== 📅 End Date: 20 February 2024 🚀Distribution Date: 28 February 2024 🔴Note:Please do your own research (DYOR) before joining to any airdrops project, also airdrop is 100% free. Don't send any fee or penny for receiving airdrop token.

Hashtags

Airdrop Ninja™

@airdropsalertteam · Post #9168 · 24.01.2024 г., 08:09

#reminder 🚨Airdrop: InpulseX $IPX 🔥Total Reward: $6000 Worth Of $IPX Tokens 🤑Refer: Top 10 Referrals Will Receive $200 Worth Of $IPX Tokens Each 🛃Website:https://InpulseX.io 📛 Winners: 1000 Winners Will Receive $4 Worth Of $IPX Tokens Each 🚧Rating:⭐️⭐️⭐️⭐️⭐️ 🤖Airdrop Bot:https://t.me/InpulseXAirdropBot =========================== 📝 Tasks: 🔘 Join The Airdrop Bot 🔘 Join Telegram Channel & Group 🔘 Follow On Twitter 🔘 Follow On Medium 🔘 Submit BNB ( Smart Chain ) Address Get It From Metamask OrTrust Wallet =========================== 📅End Date: 15 February 2024 🚀Distribution Date: 22 February 2024 🔴Note:InpulseX is an ambitious project created to offer unwavering support to the biggest mission of humankind, which is to become a multiplanetary species.

Hashtags

Airdrop Ninja™

@airdropsalertteam · Post #9166 · 24.01.2024 г., 07:34

#reminder 🚨Airdrop: OceanLand $OLAND 🔥Total Reward: 150,000 $OLAND 🤑Refer: Special Reward To Top 5 Referrals 🛃Website:https://www.oceanland.io/ 🚧Rating:⭐️⭐️⭐️⭐️⭐️ 🤖Airdrop Link :https://gleam.io/OtCwX/-oceanland-airdrop-campaign- =========================== 📝 Tasks: 🔘 Join The Airdrop Campaign 🔘 Join Telegram Channel And Group 🔘 Follow On Twitter 🔘 Submit Your BNB ( Smart Chain ) Address Get It From Trust Wallet =========================== 📅End Date: 13 March 2024 🚀Distribution Date: 15 March 2024 🔴Note:Please do your own research (DYOR) before joining to any airdrops project, also airdrop is 100% free. Don't send any fee or penny for receiving airdrop token.

Hashtags

Airdrop Ninja™

@airdropsalertteam · Post #9039 · 19.01.2024 г., 10:15

#reminder 🚨 Airdrop: UniLayer Network ✅️ 🔥 Reward: 1500 XP Points 🤑 Refer: Get Exta XP Points 🛃 Website: https://unilayer.io/ 🚧 Rating: ⭐️⭐️⭐️⭐️⭐️ 📛 Winners : All Valid Participants 🤖 Airdrop Link : https://zealy.io/c/unilayer =========================== 📝 Guide: 🔘 Go to the Airdrop Page 🔘 Sign up with Email or Discord 🔘 Consistently Complete all Tasks in our Zealy Space =========================== 📅 End Date: 31 March 2024 🚀 Distribution Date: Q2 2024 🔴 Note: Please do your own research (DYOR) before joining to any airdrops project, also airdrop is 100% free. Don't send any fee or penny for receiving airdrop token.

Hashtags

Airdrop Ninja™

@airdropsalertteam · Post #8978 · 09.01.2024 г., 08:51

#reminder 🚨 Airdrop: Bully Pad✅️ 🔥 Total Rewards: $5000 Worth of $BULLY + 250 $USDT 🤑 Refer: Top 10 Referrers will receive 25 $USDT Each 🛃 Website: https://bullypad.io 🚧 Rating: ⭐️⭐️⭐️⭐️⭐️ 📛 Winners : All Valid Participants & Top 10 Referrers 🤖 Airdrop Link : https://t.me/BullyPadAirdropBot =========================== 📝 Guide: 🔘 Start the Airdrop Bot 🔘 Complete all Tasks 🔘 Submit your SOL (Solana) Wallet =========================== 📅 End Date: 15 February 2024 🚀 Distribution Date: Q1 2024 🔴 Note: Please do your own research (DYOR) before joining to any airdrops project, also airdrop is 100% free. Don't send any fee or penny for receiving airdrop token.

Hashtags

Airdrop Ninja™

@airdropsalertteam · Post #8967 · 07.01.2024 г., 13:59

#reminder 🚨 Airdrop: Bully Pad✅️ 🔥 Total Rewards: $5000 Worth of $BULLY + 250 $USDT 🤑 Refer: Top 10 Referrers will receive 25 $USDT Each 🛃 Website: https://bullypad.io 🚧 Rating: ⭐️⭐️⭐️⭐️⭐️ 📛 Winners : All Valid Participants & Top 10 Referrers 🤖 Airdrop Link : https://t.me/BullyPadAirdropBot =========================== 📝 Guide: 🔘 Start the Airdrop Bothttps://t.me/BullyPadAirdropBot 🔘 Complete all Tasks 🔘 Submit your SOL (Solana) Wallet =========================== 📅 End Date: 15 February 2024 🚀 Distribution Date: Q1 2024 🔴 Note: Please do your own research (DYOR) before joining to any airdrops project, also airdrop is 100% free. Don't send any fee or penny for receiving airdrop token.

Hashtags

Airdrop Ninja™

@airdropsalertteam · Post #8910 · 17.11.2023 г., 04:55

#reminder 🚨 Airdrop: PepeTrade✅️ 🔥 Reward: 25 $USDT 🤑 Refer: Top 10 Referrers will receive a share of 1350 $USDT 🛃 Website: https://pepetrade.co/ 🚧 Rating: ⭐️⭐️⭐️⭐️⭐️ 📛 Winners : All Valid Participants 🤖 Airdrop Link : https://t.me/PepeTradeAirdropBot =========================== 📝 Guide: 🔘 Start The Airdrop Bot 🔘 Join Telegram Group & Channel 🔘 Complete all Tasks 🔘 Submit your Email address =========================== 📅 End Date: 30 December 2023 🚀 Distribution Date: 30 December 2023 🔴 Note: Please do your own research (DYOR) before joining to any airdrops project, also airdrop is 100% free. Don't send any fee or penny for receiving airdrop token.

Hashtags

Airdrop Ninja™

@airdropsalertteam · Post #8909 · 17.11.2023 г., 04:55

#reminder 🚨 Airdrop: Bybit x MiL.K✅️ 🔥 Total Rewards: 120,000 $USDT 🛃 Website: https://milkalliance.io/ 🚧 Rating: ⭐️⭐️⭐️⭐️⭐️ 📛 Winners : First 3000 Participants 🤖 Event Link : https://bit.ly/MLK-LegitAirdrops =========================== 📝 Guide: 🔘 Register on Bybit using the Referral link (Atleast Lv.1 KYC is required) 🔘 Accumulate a deposit volume of MLK worth at least 100 USDT in your Bybit account during the event period; OR deposit 100 USDT and buy any amount of MLK via your first trade using your Bybit account =========================== 📅 End Date: 18 December 2023 🚀 Distribution Date: Within 2 weeks after ends 🔴 Note: Please do your own research (DYOR) before joining to any airdrops project, also airdrop is 100% free. Don't send any fee or penny for receiving airdrop token.

Hashtags

Airdrop Ninja™

@airdropsalertteam · Post #8883 · 10.11.2023 г., 12:45

#reminder 🚨 Airdrop: SWGT✅️ 🔥 Reward: $10 Worth of $SWGT 🤑 Refer: Top 50 Referrers will receive $50 Worth of $SWGT Each 🛃 Website: http://swg.io/airdrop 🚧 Rating: ⭐️⭐️⭐️⭐️⭐️ 📛 Winners : 2500 Random + Top 50 Referrers 🤖 Airdrop Link : https://t.me/SwgtAirdropBot =========================== 📝 Guide: 🔘 Join Telegram Channel & Group 🔘 Follow on Twitter 🔘 Sign up at Airdrop Portal 🔘 Submit your Erc-20 wallet =========================== 📅 End Date: 20 November 2023 🚀 Distribution Date: Q1 2024 🔴 Note: Please do your own research (DYOR) before joining to any airdrops project, also airdrop is 100% free. Don't send any fee or penny for receiving airdrop token.

Hashtags

Airdrop Ninja™

@airdropsalertteam · Post #8864 · 05.11.2023 г., 08:17

#reminder 🚨 Airdrop: ChainArQ✅️ 🔥 Total Rewards: 150 $USDT 🤑 Refer: Get More Entries 🛃 Website: https://chainarq.com 🚧 Rating: ⭐️⭐️⭐️⭐️⭐️ 📛 Winners : Top 3 Referrers 🤖 Airdrop Link : https://gleam.io/EBqAk/win-1-of-3-affiliate =========================== 📝 Tasks: 🔘 Follow on Twitter 🔘 Follow on second Twitter 🔘 Submit your EVM Wallet =========================== 📅 End Date: 10 October 2023 🚀 Distribution Date: 12 October 2023 🔴 Note: Please do your own research (DYOR) before joining to any airdrops project, also airdrop is 100% free. Don't send any fee or penny for receiving airdrop token.

Hashtags

123•••10•••20•••303132
ПретходнаСтраница 1 од 32Следна