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

Резултати

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

Пребарај: #web3degen

当前筛选 #web3degen清除筛选
Telegram & TON NEWS

@all_telegram_ton_news · Post #22542 · 30.12.2025 г., 05:00

🚀TON Gifts Gambling Scene: Crash, Roulette & Pure Degen Plays – November 2025🚀 Hi degens! 🔥 You've mastered markets, stacked free daily wins, and lent Gifts for passive yields. Now enter the high-risk arena: apps where you bet Gifts (or TON) on crash, roulette, plinko, dice, or winner-takes-all pots. These are pure gambling.. house edge exists, volatility is brutal, most players lose long-term. Only play what you can afford to burn. No financial advice, just tools for responsible rebels. But for those who love the rush... here’s the hottest Gift gambling spots right now. All on TON, no KYC, instant action 🙈 ⚠️ Current Ecosystem Snapshot (Nov 21, 2025) - Gifts market cap stable ~$185-195M (down slightly from $202M summer peak but holding strong) - Stickers surging hard (600%+ YTD, ~$30M+ cap) but Gifts still 6-8x bigger - Limited drops & celebrity collabs still printing 50-300x for holders - TON NFT volume routinely top 3 chains globally – all fueled by Telegram's 1B users going degen 🎰 Top Gifts Gambling Apps (High Stakes Edition) 1. Rolls – Let's Fucking Roll 🎡 Winner-takes-ALL Gift pots! Deposit Gifts→ more valuable Gift = higher win chance. 2+ players trigger the roll. They also let you stake Gifts for +25% APR TON rewards (passive play). Pure adrenaline. https://t.me/rollsgame_bot/app?startapp=ref_izDyhtZZBA 2. Balls Plinko + Ball Escape madness. Drop balls, watch physics do the rest, win big on drops. https://t.me/myballs/app?startapp=ref_tzdt0z2l7bj 3. Bust'a Gift Classic crash but with Telegram Gifts on the line. Time your cashout or get rekt. https://t.me/bustagift_xbot/app?startapp=pal403954791 4. Epic Gift Crash game supporting both Gifts & TON bets. Also has daily free rolls (best of both worlds). https://t.me/epic_gift_bot/app?startapp=ref_JPFOFQ 5. Gift Phase Double, Dice, Spin Roulette. bet small, win your first (or next) Gift fast. https://t.me/GiftPhaseBot/GiftPhase?startapp=403954791 6. Pilot Clean crash game, TON only, super smooth multipliers. For the pure aviator lovers. https://t.me/BullApp_bot?start=403954791 7. GiftUp Crash + Crates opening. Unbox or ride the multiplier with your Gifts. https://t.me/GiftUpRobot?start=403954791 These apps move FAST.. new ones pop up, some get rugged, always check community sentiment in @DCH_Community before going hard. Remember rebels: Gambling is entertainment, not income. Stack on markets & lending for real alpha. But if you're feeling lucky and can handle the swing... LET’S FUCKING ROLL 🎲 What's your craziest win or worst rug story? Drop it in the chat – we learn together ✊ We are #TheRealDigitalResistance #TelegramGifts#TONGambling#GiftCrash#NoKYC#Web3Degen#PrivacyMatters