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

Резултати

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

Пребарај: #ens

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

@CoinSonar · Post #243334 · 16.04.2026 г., 21:49

#ENS | Volume spike (USDT PAIR) 12 times the average volume 129.53K USDT traded in 15 min └Selling vol: 113.21K USDT 🔴 Boost score: 1/10 24h Vol: 981.00K USDT (Binance) Price: 6.17 (-3.3% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243271 · 16.04.2026 г., 18:53

#ENS | Volume spike (USDT PAIR) 167 times the average volume 114.35K USDT traded in 1 min └Selling vol: 57.63K USDT 🔴 Boost score: 1/10 24h Vol: 981.00K USDT (Binance) Price: 6.17 (-3.3% in 24h)

Hashtags

CryptoBull_360™

@cryptobull_360 · Post #48363 · 15.02.2026 г., 13:55

#ENS is rebounding from the support trendline of the descending channel, with the Ichimoku Cloud acting as a resistance barrier. A decisive breakout above both the channel and the cloud would confirm bullish momentum.

Hashtags

Pro Analysis

@proanalysistrader · Post #28383 · 12.01.2025 г., 05:38

#ENS/USDT analysis : #ENS is currently in an uptrend, consistently reaching new highs while trading above the 200 EMA. The price is now retracing towards the 200 EMA and a significant support level. It is expected that the price will test this zone and rebound, which should support the continuation of bullish momentum and will lead to a retest of previous highs. TF : 1D Entry : $30.35 Target : $47 SL : $23.38

Hashtags

Pro Analysis

@proanalysistrader · Post #28309 · 04.12.2024 г., 11:33

#ENS/USDT analysis : #ENS is currently in an uptrend, trading above the 200 EMA. The price has recently bounced back from the 200 EMA, suggesting a continuation of its bullish momentum and potential testing of higher levels. For a long entry, it is advisable to wait for a retracement to optimize the entry point. TF : 30min Entry : $43 Target : $48 SL : $38

Hashtags

American Crypto©

@americancryptotrading · Post #27516 · 27.01.2026 г., 10:59

🇺🇸#ENS/USDT is holding above the supportzone on the 3D chart🧐 Recovery phase is starting🚀 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27234 · 30.04.2025 г., 10:25

🇺🇸#ENS/USDT is challenging the upperborder of the broadeningwedge on the daily chart🧐 Looking for a breakout🐃 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27103 · 31.12.2024 г., 13:08

🇺🇸#ENS/USDT is retesting the s/rzone on the weekly timeframe👨‍💻 To the moon after bounce🚀 American Crypto©

Hashtags

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