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

Резултати

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

Пребарај: #acm

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

@CoinSonar · Post #244245 · 18.04.2026 г., 15:22

#ACM | Volume spike (USDT PAIR) 36 times the average volume 128.53K USDT traded in 15 min └Buying vol: 85.31K USDT 🟢 Boost score: 5/10 24h Vol: 339.60K USDT (Binance) Price: 0.461 (-1.7% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28462 · 10.02.2025 г., 11:36

#ACM/USDT analysis : #ACM is currently in a correction phase and is expected to retrace to test the 200 EMA before resuming its bearish momentum. However, the current level presents a good opportunity for long trade. TF : 4H Entry : $1.075 Target : $1.193 SL : $0.994

Hashtags

Pro Analysis

@proanalysistrader · Post #28359 · 30.12.2024 г., 13:44

#ACM/USDT analysis : #ACM is currently in a downtrend, with the price consistently trading below the 200 exponential moving average (EMA). Recent price action shows a rejection from the 200 EMA, suggesting a continuation of the downward momentum. As a result, it is expected that the price will decline further and test previous lows. TF : 1D Entry : $1.520 Target : $1.235 SL : $1.690

Hashtags

Pro Analysis

@proanalysistrader · Post #28069 · 25.10.2024 г., 12:41

#ACM/USDT analysis : #ACM is in a downtrend, trading below the 200 EMA. The price is currently retracing back to the 200 EMA and a resistance zone, and it is expected to decline from this point, continuing its bearish momentum to test lower levels. It is advisable to wait for a pullback for a short entry. TF : 1H Entry : $1.535 Target : $1.478 SL : $1.567

Hashtags

American Crypto©

@americancryptotrading · Post #27530 · 10.02.2026 г., 10:38

🇺🇸#ACM/USDT is attempting to bounce from the lowerborder of the descendingchannel on the 3D timeframe💁‍♂️ Looking for a rise📈 American Crypto©

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #7951 · 21.07.2022 г., 15:07

#ACM👈 Call given here Hit 1667 Target 1 done ✅ 14% profit If you invested 1 btc it's now 1.14 btc now 🤑🤑 Signal before pump @ low level Always trade with us for max profit 😊🤑💃 We are best pump tracker 🤑

Hashtags

PT风向旗

@Ptfxq · Post #251 · 15.09.2021 г., 10:35

#ACM ACM 发布公告表示 3 周年以来,其服务器的成本大多数由 SysOP 来承担。由于资金问题,如果在 本月底(2021/09月) 之前筹集不到 1200 欧元将会关闭网站。 除此之外,还移除了捐助者免除 HR 的权限。 感谢 PTfxq 12 号记录员写稿。

Hashtags

PT风向旗

@Ptfxq · Post #517 · 23.12.2023 г., 00:36

#ACM#站免 ACM 五周年,站免两周。 Dear @everyone We are absolutely thrilled to announce that we are celebrating the 5th anniversary of our beloved platform dedicated to the mesmerizing world of Asian cinema! 🥳🍾 It feels like just yesterday that we embarked on this incredible journey, passionate about bringing you the best of Asian cinema. Over the past five years, we've delved deep into the heart of cinematic artistry, exploring the rich tapestry of stories, cultures, and talents that make Asian cinema truly exceptional. One of our core missions has always been to spread our love for Asian cinema around the globe and are very proud of what we have been able to accomplish so far. We've had the privilege of showcasing masterpieces, hidden gems, and emerging talents from across Asia. From the heartwarming dramas to the pulse-pounding action, the thought-provoking indie films to the visually stunning blockbusters, every frame has been a celebration of the cinematic excellence that defines Asian cinema. To mark this momentous occasion, we have activated global FreeLeech (FL) for the next 2 weeks so you can finally download all those films you have bookmarked since our last global FL :). This celebration is not just about looking back but also about looking forward to the exciting cinematic adventures that await us. None of this would have been possible without the unwavering support of our dedicated community. To each and every one of you who has shared their love for Asian cinema, contributed insightful discussions, and made this platform a vibrant hub – THANK YOU! Your enthusiasm fuels our passion, and we are incredibly grateful for your ongoing support. As we raise a virtual toast to the past five years, we eagerly look forward to the next chapter. With your continued support, we are confident that the future holds even more exciting discoveries, cinematic treasures, and shared moments of joy. Thank you for being a part of our cinematic journey. Here's to five years of Asian cinema magic, and to many more to come! Cheers to the love of film! 🎉🎬✨ Yours, AsianCinema Team

Hashtags

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