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

Резултати

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

Пребарај: #nmr

当前筛选 #nmr清除筛选
Coin Sonar

@CoinSonar · Post #244171 · 18.04.2026 г., 12:26

#NMR | Volume spike (USDT PAIR) 317 times the average volume 98.25K USDT traded in 1 min └Selling vol: 61.49K USDT 🔴 Boost score: 1/10 24h Vol: 445.92K USDT (Binance) Price: 8.75 (-1.3% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243656 · 17.04.2026 г., 13:09

#NMR | Volume spike (USDT PAIR) 28 times the average volume 130.67K USDT traded in 15 min └Selling vol: 79.47K USDT 🔴 Boost score: 1/10 24h Vol: 445.92K USDT (Binance) Price: 8.86 (-1.3% in 24h)

Hashtags

American Crypto©

@americancryptotrading · Post #27188 · 18.03.2025 г., 12:27

🇺🇸#NMR/USDT has crossed through the descendingresistance on the daily timeframe🔍 Climbing higher from here🐃 American Crypto©

Hashtags

Alphavave Traders ️️️

@alphavave · Post #3048 · 25.12.2025 г., 02:00

#NMR is crushing it with a 1,925% profit! 💰💵 That's a 1️⃣9️⃣🔤 return on your money from just one signal😉💵 Not going to lie, we have pretty much cracked the crypto code here. The results speak for themselves. Bet you are wondering how... Too bad most won't ever figure it out💯 you want the Same, this is your last chance🎁 ⚡️Don't miss the Christmas Sale!⚡️ ✅Monthly access is now just $30 (originally $200) ✅6-Month access is now just $75 (originally $500) ✅Lifetime access is now just $188 💵 (originally $1250) Let’s make this your most profitable Christmas yet! 🎉 DM me now! 👉@Kevindexter✅

Hashtags

CRYPTO SIGNALS FREE

@crypto_vip_signals_free · Post #372 · 13.08.2021 г., 05:06

#NMR is a type of hedge fund built by a network of data scientists fundamentally it is a strong project which haven’t pumped much in this altseason and definitely having potential to become a top gainer on binance. Technically NMR is on horizontal support and having bullish OBV divergence on 4H timeframe stochastic RSI looking bullish on 1D so now is the right time to build your position in it before breakout for massive profit😊 Target : 0.001-0.0011-0.00125-0.0015 For premium contatct @cryptomathh

Hashtags

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