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

Резултати

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

Пребарај: #mina

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

@CoinSonar · Post #243985 · 18.04.2026 г., 05:37

#MINA | Volume spike (USDT PAIR) 179 times the average volume 95.80K USDT traded in 1 min └Selling vol: 74.32K USDT 🔴 Boost score: 1/10 24h Vol: 768.66K USDT (Binance) Price: 0.0608 (-1.4% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28567 · 21.03.2025 г., 15:57

#MINA/USDT analysis : #MINA is currently in a downtrend, trading below the 200 EMA. The price is currently testing the resistance zone and showing bearish sentiments. It is anticipated to decline from there and test the swing low levels. TF : 2h Entry : $0.2585 Target : $0.2425 / $0.2253 SL : $0.2782

Hashtags

Pro Analysis

@proanalysistrader · Post #27983 · 04.10.2024 г., 11:39

#MINA/USDT analysis : #MINA has recently broken support levels. The price is likely to retest the zone and continue its bearish momentum. Previous lows will be tested. TF : 4H Entry : $0.5301 Target : $0.4415 SL : $0.5905

Hashtags

American Crypto©

@americancryptotrading · Post #27622 · 16.05.2026 г., 09:30

🇺🇸#MINA/USDT is rebounding from the lowerboundary of the descendingchannel on the weekly timeframe👨‍💻 Looking for a bounce📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27558 · 15.03.2026 г., 10:18

🇺🇸#MINA/USDT is attempting to bounce from the lowerborder of the descendingchannel pattern on the weekly timeframe💁‍♂️ Pressure is building🚀 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27502 · 14.01.2026 г., 11:05

🇺🇸#MINA/USDT is bouncing from the lowerborder of the descendingchannel formation on the weekly timeframe🔍 Full send🐃 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27428 · 04.11.2025 г., 09:58

🇺🇸#MINA/USDT is currently shaping the descending channel on the weekly chart💁‍♂️ Looks bullish📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27241 · 07.05.2025 г., 10:31

🇺🇸#MINA/USDT is facing the lowerboundary of the fallingwedge on the weekly timeframe💁‍♂️ Looks good for the mid-term🐃 American Crypto©

Hashtags

Free Crypto Signals (Profitable Zone)

@btctradingclub · Post #26274 · 06.11.2025 г., 18:40

✅✅ 61% Profit on #MINA/USDT for our Premium Members on Binance Futures/Bybit/OKX & KuCoin 🔥🔥 All target completed 👁‍🗨Contact @primemod to enter the Premium Binance Futures/Bybit/Kucoin/OKX & SPOT Group for daily gains

Hashtags

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