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

Резултати

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

Пребарај: #exodus

当前筛选 #exodus清除筛选
NEWS 鏈新聞-ABMedia

@abmedia_news · Post #24292 · 02.05.2026 г., 03:00

【💰 交易市場|Exodus 創辦人:助記詞還要靠酒吧餐巾紙紀錄表示產業仍有進步空間】 #Exodus#ExodusPay#AI#Agent Exodus 執行長 JP Richardson 於 Omaha 峰會主張轉型全端支付,以解決加密產業長期存在的支付零碎化問題。 該公司斥資 1.75 億美元併購基礎設施,並推出支援 AI 代理與 Apple Pay 的支付功能。營收降至 2,270 萬美元 — 垂直整合將是轉型關鍵。 📍閱讀全文: https://abmedia.io/exodus-founder-indicates-seed-phrase-is-out-of-day 📍 訂閱鏈新聞頻道:https://linktr.ee/abmedia.io

Crypto M - Crypto News

@CryptoM · Post #65103 · 11.04.2026 г., 01:36

🚀 Exodus Launches Self-Custody Payments App for Bitcoin and Stablecoins Exodus has introduced a new self-custody payments application, enabling users to spend Bitcoin and dollar stablecoins. According to NS3.AI, the app is compatible with merchants that accept Visa and Apple Pay, providing a seamless payment experience for cryptocurrency holders. #Exodus#Bitcoin#Stablecoins#SelfCustody#CryptoPayments#Visa#ApplePay#Cryptocurrency#BTC

Venture Village Wall 🦄

@venturevillagewall · Post #3439 · 19.12.2024 г., 08:00

Exodus Surges on NYSE Debut Exodus, a developer of non-custodial software, debuted on the NYSE under the ticker EXOD, achieving an impressive 36% growth during its first trading session. The company's market capitalization reached $1.4 billion. #Exodus#NYSE#software#growth#debut#trading#capitalization#market#stocks#investments

Crypto M - Crypto News

@CryptoM · Post #65102 · 11.04.2026 г., 01:25

🚀 Exodus Introduces New Payment Feature for Select States Exodus, a publicly listed cryptocurrency wallet provider, has launched a new feature called Exodus Pay. According to Foresight News, this feature aims to transform its self-custody storage application into a tool for everyday payments. Currently, the service is available only to users in five states, including New York and California. #Exodus#PaymentFeature#ExodusPay#Cryptocurrency#SelfCustody#EverydayPayments#NewYork#California#ForesightNews

Venture Village Wall 🦄

@venturevillagewall · Post #3437 · 19.12.2024 г., 07:05

Exodus Debuts on NYSE with 36% Gain Exodus, a developer of non-custodial software, made its debut on the New York Stock Exchange (NYSE) under the ticker EXOD. In its first trading session, shares surged 36%, bringing the company's market capitalization to $1.4 billion. For more details, visit ForkLog. #Exodus#NYSE#IPO#StockMarket#Investing#Growth#TechStocks#FinancialNews#Blockchain#Software#NonCustodial#MarketCapitalization#Trading#WallStreet