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

Резултати

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

Пребарај: #imx

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

@CoinSonar · Post #243970 · 18.04.2026 г., 04:55

#IMX | Volume spike (USDT PAIR) 204 times the average volume 101.81K USDT traded in 1 min └Buying vol: 54.51K USDT 🟢 Boost score: 5/10 24h Vol: 715.73K USDT (Binance) Price: 0.167 (-2.8% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28446 · 02.02.2025 г., 13:06

#IMX/USDT analysis : #IMX is in an uptrend, forming higher highs (HHs) and higher lows (HLs). The price is currently undergoing a correction phase and is expected to test the previously respected support zone. A rebound from this level is anticipated, allowing the bullish momentum to resume and potentially test previous highs. TF : 1W Entry : $0.850 Target : $3.761 SL : $0.565

Hashtags

Pro Analysis

@proanalysistrader · Post #27820 · 08.08.2024 г., 14:57

#IMX/USDT analysis - #IMX is in a correction phase, showing retracement towards the 200 EMA. Price is expected to test the resistance zone and reject from there to continue its downward direction. The previous swing low will be tested. TF : 2H Entry : $1.208 Target : $0.985 SL : $1.298

Hashtags

Coinlegs Cryptocurrency Signals

@coinlegs · Post #10218 · 19.04.2024 г., 09:02

#IMX | Trendline Breakout detected by CoinLegs Algorithm 😎 After a retest of breakout, long position can be taken. Put your stop loss below the trendline (candle close). www.coinlegs.com

Hashtags

BULLSTAR - SIGNALS

@bullstar1 · Post #5166 · 20.02.2026 г., 16:46

COIN: $IMX/USDT (5-10x) Direction: LONG 📈 #IMX/USDT Take-Profit Target 4🎯 Profit : 32.66% with 10x Leverage (PREMIUM SIGNAL) Everyone else trying to survive… while our VIPs keep scoring big🔥 t.me/BULLSTAR_ADMIN

Hashtags

BULLSTAR - SIGNALS

@bullstar1 · Post #4986 · 24.12.2025 г., 23:18

COIN: $IMX/USDT (5-10x) Direction: LONG 📈 #IMX/USDT Take-Profit Target 3🎯 Profit : 22.82% with 10x (PREMIUM SIGNAL) This is the profit we make every day with our VIP members. We secured the profit, moved the stop-loss to entry, and now we’re holding the rest for the upcoming targets 🚀 t.me/BULLSTAR_ADMIN

Hashtags

BULLSTAR - SIGNALS

@bullstar1 · Post #4354 · 09.08.2025 г., 09:52

COIN: $IMX/USDT (5-10x) Direction: LONG 📈 #IMX/USDT Take-Profit Target 5🎯 Profit : 45.20% with 10x Leverage (PREMIUM SIGNAL) First 5 TP levels reached, profit taken and stops moved. Nice move!🚀 t.me/BULLSTAR_ADMIN

Hashtags

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