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

Резултати

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

Пребарај: #dash

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

@CoinSonar · Post #244150 · 18.04.2026 г., 11:39

#DASH | Volume spike (USDT PAIR) 63 times the average volume 131.74K USDT traded in 1 min └Selling vol: 89.64K USDT 🔴 Boost score: 1/10 24h Vol: 3.01M USDT (Binance) Price: 35.21 (-2.6% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #244090 · 18.04.2026 г., 09:09

#DASH | Volume spike (USDT PAIR) 10 times the average volume 313.67K USDT traded in 15 min └Selling vol: 246.49K USDT 🔴 Boost score: 1/10 24h Vol: 3.01M USDT (Binance) Price: 36.32 (-2.6% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243804 · 17.04.2026 г., 18:09

#DASH | Volume spike (USDT PAIR) 72 times the average volume 152.34K USDT traded in 1 min └Selling vol: 138.78K USDT 🔴 Boost score: 1/10 24h Vol: 3.01M USDT (Binance) Price: 36.98 (-2.6% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243665 · 17.04.2026 г., 13:17

#DASH | Volume spike (USDT PAIR) 9 times the average volume 303.11K USDT traded in 15 min └Buying vol: 190.56K USDT 🟢 Boost score: 6/10 24h Vol: 3.01M USDT (Binance) Price: 37.42 (-2.6% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243403 · 17.04.2026 г., 01:38

#DASH | Volume spike (USDT PAIR) 69 times the average volume 145.21K USDT traded in 1 min └Buying vol: 144.12K USDT 🟢 Boost score: 8/10 24h Vol: 3.01M USDT (Binance) Price: 37.07 (-2.6% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243283 · 16.04.2026 г., 19:05

#DASH | Volume spike (USDT PAIR) 10 times the average volume 314.96K USDT traded in 15 min └Selling vol: 185.85K USDT 🔴 Boost score: 1/10 24h Vol: 3.01M USDT (Binance) Price: 37.65 (-2.6% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28435 · 30.01.2025 г., 15:49

#DASH/USDT analysis : #DASH has successfully broken out and retested the previously respected resistance zone. The price is expected to rebound from the current level and aim for previous swing highs. For a long entry, it is advisable to wait for a breakout above the $36.13 level. TF : 1D Entry : $36.13 Target : $65.69 SL : $29.25

Hashtags

Pro Analysis

@proanalysistrader · Post #28338 · 13.12.2024 г., 13:36

#DASH/USDT analysis : #DASH has broken out of the trendline following a bounce back from the 200 EMA. The price is anticipated to resume its bullish momentum and test previous highs. TF : 4H Entry : $48.5 Target : $71 SL : $39.8

Hashtags

American Crypto©

@americancryptotrading · Post #27521 · 01.02.2026 г., 11:13

🇺🇸#DASH/USDT is stabilizing near the broken fallingwedge formation on the weekly chart🔥 Time to rise🐃 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27478 · 23.12.2025 г., 09:34

🇺🇸#DASH/USDT is retesting the broken s/rzone on the weekly timeframe👨‍💻 Bullish case if we bounce📈 American Crypto©

Hashtags

123•••89
ПретходнаСтраница 1 од 9Следна