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

Резултати

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

Пребарај: #rare

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

@CoinSonar · Post #244076 · 18.04.2026 г., 08:35

#RARE | Volume spike (USDT PAIR) 706 times the average volume 100.41K USDT traded in 1 min └Selling vol: 67.55K USDT 🔴 Boost score: 1/10 24h Vol: 204.67K USDT (Binance) Price: 0.0178 (-0.7% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243974 · 18.04.2026 г., 05:04

#RARE | Volume spike (USDT PAIR) 78 times the average volume 167.82K USDT traded in 15 min └Selling vol: 105.84K USDT 🔴 Boost score: 1/10 24h Vol: 204.67K USDT (Binance) Price: 0.0197 (-0.7% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243939 · 18.04.2026 г., 03:04

#RARE | Volume spike (USDT PAIR) 61 times the average volume 130.91K USDT traded in 15 min └Selling vol: 92.11K USDT 🔴 Boost score: 1/10 24h Vol: 204.67K USDT (Binance) Price: 0.0200 (-0.7% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243906 · 18.04.2026 г., 01:04

#RARE | Volume spike (USDT PAIR) 60 times the average volume 129.48K USDT traded in 15 min └Selling vol: 64.99K USDT 🔴 Boost score: 1/10 24h Vol: 204.67K USDT (Binance) Price: 0.0216 (-0.7% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243865 · 17.04.2026 г., 23:03

#RARE | Volume spike (USDT PAIR) 169 times the average volume 120.57K USDT traded in 5 min └Selling vol: 78.72K USDT 🔴 Boost score: 1/10 24h Vol: 204.67K USDT (Binance) Price: 0.0222 (-0.7% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243839 · 17.04.2026 г., 21:03

#RARE | Volume spike (USDT PAIR) 669 times the average volume 95.14K USDT traded in 1 min └Buying vol: 75.32K USDT 🟢 Boost score: 8/10 24h Vol: 204.67K USDT (Binance) Price: 0.0176 (-0.7% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243578 · 17.04.2026 г., 09:47

#RARE | Volume spike (USDT PAIR) 156 times the average volume 111.09K USDT traded in 5 min └Buying vol: 80.75K USDT 🟢 Boost score: 6/10 24h Vol: 204.67K USDT (Binance) Price: 0.0168 (-0.7% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28559 · 19.03.2025 г., 10:18

#RARE/USDT analysis : #RARE is currently in an uptrend, trading above its 200 Exponential Moving Average (EMA). The price is currently testing the support zone and the 200 EMA. It is expected that the price will bounce back from these levels and will test the swing high. For a long entry opportunity, consider waiting for the price to break above the $0.0930 level. TF : 2h Entry : $0.0930 Target : $0.1250 SL : $0.0792

Hashtags

Pro Analysis

@proanalysistrader · Post #28451 · 04.02.2025 г., 15:40

#RARE/USDT analysis : #RARE is currently undergoing a corrective pullback, anticipated to test the 200 EMA before resuming its bearish momentum. This situation creates a potential long trade opportunity on lower time frame (LTF). TF : 1h Entry : $0.0692 Target : $0.0802 SL : $0.0634

Hashtags

Pro Analysis

@proanalysistrader · Post #28251 · 24.11.2024 г., 05:58

#RARE/USDT analysis : #RARE has broken above the trendline after consolidating in a support zone, indicating a bullish shift. The price is expected to bounce off this zone and rise, testing previous swing highs. TF : 1D Entry : $0.1330 Target : $0.2960 SL : $0.0923

Hashtags

American Crypto©

@americancryptotrading · Post #27585 · 11.04.2026 г., 09:18

🇺🇸#RARE/USDT is maintaining its position above the lowerborder of the fallingwedge pattern on the 3D timeframe👨‍💻 Rebound incoming✈️ American Crypto©

Hashtags

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