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

Резултати

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

Пребарај: #ctsi

当前筛选 #ctsi清除筛选
Pro Analysis

@proanalysistrader · Post #28151 · 10.11.2024 г., 03:40

#CTSI/USDT analysis : #CTSI is currently trading at a support zone and is expected to bounce back from this level, rising to test the resistance zone. A potential gain of 140% is anticipated from the current level. TF : 1W Entry : $0.1405 Target : $0.3404 SL : $0.0888

Hashtags

Pro Analysis

@proanalysistrader · Post #27843 · 15.08.2024 г., 14:28

#CTSI/USDT analysis : #CTSI has bounced off from the support zone and is expected to continue its bullish momentum towards the previous swing high. TF : 30min Entry : $0.1250 Target : $0.1295 SL : $0.1218

Hashtags

American Crypto©

@americancryptotrading · Post #27187 · 17.03.2025 г., 17:31

🇺🇸#CTSI/USDT is rebounding from the lowerborder of the falling wedge on the weekly timeframe🔍 More upside is expected📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27135 · 28.01.2025 г., 14:12

🇺🇸#CTSI/USDT is attempting to bounce from the lowerborder of the descendingtriangle pattern on the weekly timeframe👨‍💻 Time to load a bag🐃 American Crypto©

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #9146 · 29.06.2025 г., 11:32

#CTSI👈 https://www.binance.com/en/trade/CTSI_BTC Buying Zone 54-56 Showing bullish momentum Highly pumpable Coin Sell 🤑 60-62 🤑 62-68 🤑 68-75 🚀 75-85 & above Bullish above 50🔼 Death zone below 50🔽

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #9074 · 24.10.2024 г., 16:11

#CTSI👈 https://www.binance.com/en/trade/CTSI_BTC Buying Zone 200-215 Showing bullish momentum Highly pumpable Coin Sell 🤑 250-260 🤑 260-280 🤑 280-300 🚀 300-330 & above Bullish above 190🔼 Death zone below 185🔽

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #9053 · 22.08.2024 г., 17:10

#CTSI👈 https://www.binance.com/en/trade/CTSI_BTC Buying Zone 220-230 Showing bullish momentum Sell 🤑 250-260 🤑 260-280 🤑 280-300 🚀 300-330 & above Bullish above 200🔼 Death zone below 200🔽

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #9024 · 06.06.2024 г., 02:19

#CTSI👈 https://www.binance.com/en/trade/CTSI_BTC Buying Zone 340-355 Showing bullish momentum Sell 🤑 380-400 🤑 400-430 🤑 430-460 🚀 460-500 & above Bullish above 330🔼 Death zone below 330🔽

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #8671 · 26.01.2023 г., 18:04

#CTSI👈 https://www.binance.com/en/trade/CTSI_BTC Buying Zone 630-660 👆 Buy in parts 👈Strictly follow as directed 👆 Showing bullish momentum Sell 🤑 700-750 🤑 750-800 🤑 800--900 🤑 900- 1000 🚀 1000-1100 & above Bullish above 600

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #8596 · 18.12.2022 г., 18:04

#CTSI👈 https://www.binance.com/en/trade/CTSI_BTC Buying Zone 600-615 👆 Buy in parts 👈Strictly follow as directed 👆 Showing bullish momentum Sell 🤑 650-700 🤑 700-800 🤑 800--900 🤑 900- 1000 🚀 1000-1100 & above SL 580

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #8532 · 24.11.2022 г., 09:40

#CTSI👈 https://www.binance.com/en/trade/CTSI_BTC Buying Zone 630-640 👆 Buy in parts 👈Strictly follow as directed 👆 Showing bullish momentum Sell 🤑 700-800 🤑 800--900 🤑 900- 1000 🚀 1000-1100 & above SL 560

Hashtags

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