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

Резултати

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

Пребарај: #yescoin

当前筛选 #yescoin清除筛选
🏆 Premium, NFT, Tokens

@giiveaways · Post #3383 · 20.12.2024 г., 12:51

🪙Yescoin has conducted a snapshot. According to the progress bar, at least two more are expected. In the announcement, it is mentioned that rewards will be given for activity (e.g., daily logins) and community growth, such as inviting friends. 👉 Access Yescoin via this link ✍️Mr. X ....... @Yescoin_bot/ 👈 ➖➖➖➖➖➖➖➖➖➖ #Yescoin

Hashtags

Yescoin Foundation

@therealyescoin · Post #257 · 18.01.2025 г., 18:37

At Yescoin, we’re changing the game. We’re flipping the script and giving EVERYTHING to you! 🔥 Transform Your Creativity into Earnings with the Yescoin Accelerator Program! 🤔 How Does It Work? Create content about Yescoin, and we’ll sponsor it for FREE, giving you exposure to millions of users. Grow your audience and monetize on platforms like YouTube. ✅Joining is simple: 1. Create Content About Yescoin • Focus on videos 5+ minutes for better monetization. • Use #Yescoin and include your referral link to earn through our affiliate program. 2. Share Your Video • Post your video link in the Yescoin Accelerator community to network with creators and get tutor support. 3. Get Featured and Earn • We’ll add your video to our mini-app, promote it for FREE, and help you start earning! Your content, our sponsorship,success starts here!

Hashtags

Yescoin Foundation

@therealyescoin · Post #255 · 17.01.2025 г., 10:11

We’re excited to announce the launch of our Content Contest! Here’s how you can participate: 1. Create a video about Yescoin. 2. Use the hashtag #Yescoin. 3. Post it on your favorite social media platform: TikTok, YouTube, Instagram, or anywhere else. 4. Quantity over Quality: The more content you create, the higher your chances of winning 💰PRIZES The rewards are split into two categories: 1. Long-Form Content Contest: • $5,000 prize pool • 100 winners will each receive $50. • Includes tutorials, informative videos, and other long-form content. 2. Short-Form Content Contest: • $5,000 prize pool • 100 winners will each receive $50. • Includes memes, Twitter posts, Reels, TikToks, and YouTube Shorts. The Yescoin community will begin selecting the winners on February 15th.

Hashtags

TN MiniCrypto Official

@swift_airdrops · Post #5286 · 23.07.2024 г., 14:54

🤩 Yescoin Mining Free Airdrop & Users who visit #Yescoin and complete Bitget Wallet-related tasks will receive 3 raffle entries that will be shared in a million dollar prize pool. 👉 Join Airdrop :- https://t.me/realyescoinbot/something?startapp=t_1048396301_1048396301036 👍 Start the Bot to Claim Yescoin 👍 Complete Task and Collect Points 👍 Click Boost to Increase your level & Buy tap bot 👍 Done 👉 How to participate bitget event :- 1️⃣Download Bitget wallet :- bitgetwallet.onelink.me/6Vx1/kboazuo1 2️⃣Visit Home page for the #TON Ecosystem Carnival event 3️⃣Complete All Yescoin activity tasks 4️⃣Don't miss out! Explore the TON ecosystem and earn amazing rewards! #Note :- Join fast before August 18th & It's 💯 Verified project don't skip 🔥

🏆 Premium, NFT, Tokens

@giiveaways · Post #3167 · 22.09.2024 г., 07:02

🤩🌐🤑Yescoin has claimed the top spot in the TON Tournament's weekly battle rankings, powered by Bybit! 💫The competition remains fierce, with Yescoin leading the way in this exciting tournament. Stay tuned for more updates and developments. 👉All Play, All Gain, All on TON! The momentum continues, showcasing the power of YES! 🔔Subscribe📈ByBit ➡️Yescoin ➖➖➖➖➖➖➖➖➖➖➖ #yescoin#bybit#taptap#crypto

Airdrop Center

@centralchanel · Post #15474 · 19.12.2024 г., 05:38

@Yescoin_Fam@cex_io, whom we have been waiting for for a long time, announced that they will take 📷 snapshots this weekend. The last days are now. 🔥🔥 I hope there will be good exchanges and listings. Both have very solid infrastructures. Let's see if those who work hard will win. 👉Yescoin https://t.me/CentralChanel/15157 👉Cexio https://t.me/CentralChanel/13801 #Telegram#Airdrop#Yescoin#Cexio

🏆 Premium, NFT, Tokens

@Giiveaways · Post #1991 · 06.06.2024 г., 17:43

🎉 $10,000 Giveaway Announcement! 🎉 To celebrate reaching 5,5 million users, we're launching the biggest giveaway ever in the ton space! For your chance to be one of 100 lucky winners, check out all the details in the link below👇 https:://t.me/realyescoinbot #crypto#game#giveaway#usdt#yescoin

Red Coins Club

@redcoinsclub · Post #243 · 18.06.2024 г., 09:09

Друзья, обновляю список таполок, которые у меня есть! Про то как запустить приложение, если у вас не работает страница бота написала тут - https://t.me/redcoinsclub/236 ТОП Проекты 1. 🏠Cityholder🆕 2. 🐹Hamster 3. 🤑Blum (~400 invites) 4. 🤩YesCoin🆕 5. 🤝 PixelTap 6. 🪙ThePixels 7. 🪙Cexio #yescoin#blum#notcoin#cexio#pixel#cityholder

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