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

Резултати

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

Пребарај: #ong

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

@CoinSonar · Post #243938 · 18.04.2026 г., 03:01

#ONG | Volume spike (USDT PAIR) 16 times the average volume 130.84K USDT traded in 15 min └Buying vol: 89.48K USDT 🟢 Boost score: 6/10 24h Vol: 768.94K USDT (Binance) Price: 0.0893 (-5.0% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243905 · 18.04.2026 г., 00:59

#ONG | Volume spike (USDT PAIR) 40 times the average volume 109.28K USDT traded in 5 min └Buying vol: 60.13K USDT 🟢 Boost score: 6/10 24h Vol: 768.94K USDT (Binance) Price: 0.0842 (-5.0% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28368 · 05.01.2025 г., 15:33

#ONG/USDT analysis : #ONG is currently moving sideways within a support and resistance zone on the weekly timeframe. The price is bouncing back from the support level and is anticipated to continue rising, aiming to test the resistance zone. A potential gain of +100% is expected from the current level. TF : 1D Entry : $0.3400 Target : $0.7280 SL : $0.2390

Hashtags

Pro Analysis

@proanalysistrader · Post #28129 · 06.11.2024 г., 15:42

#ONG/USDT analysis : #ONG is in a downtrend, making new lows while trading below the 200 EMA. The price is currently showing a retracement towards the 200 EMA and the resistance zone, and it is expected to reverse and continue its bearish momentum. It is advisable to wait for the price to retest the zone and show rejection for a short entry. TF : 4h Entry : $0.2869 Target : $0.2631 SL : $0.3005

Hashtags

Pro Analysis

@proanalysistrader · Post #27832 · 12.08.2024 г., 13:42

#ONG/USDT analysis : #ONG is presently trading within the resistance zone below the 200 EMA. The current price action indicates rejection at this resistance level. There is a strong expectation that the price will persist in its downward momentum and revisit previous lows. It is recommended to await a break below the $0.2811 level for confirmation before considering an entry. TF : 4H Entry : $0.2811 Target : $0.2322 SL : $0.3118

Hashtags

American Crypto©

@americancryptotrading · Post #27144 · 04.02.2025 г., 19:27

🇺🇸#ONG/USDT is bouncing from the s/rzone on the weekly timeframe💁‍♂️ Looking for a rise🚀 American Crypto©

Hashtags

Coinlegs Cryptocurrency Signals

@coinlegs · Post #10207 · 17.04.2024 г., 08:04

#ONG | Trendline Breakout Detected by CoinLegs Algo 😎 Long position can be opened when the price returns to the trend line and approaches the yellow zone. The yellow zone is both a strong demand, EMA 50 and the Ichimoku zone.

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #9180 · 30.01.2026 г., 12:40

#ONG👈 https://www.binance.com/en/trade/ONG_BTC Buyzone 91-93 ✔️ Sell 🤑 100-105 🤑 105-115 🤑 115-125 🚀 125-135 & above Bullish above 86-88 Range For above Projections value must remains above 88 else coin will be in dead zone

Hashtags

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