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

Резултати

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

Пребарај: #securitize

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

@abmedia_news · Post #24394 · 06.05.2026 г., 02:30

【📜 政策監理|Securitize 獲 FINRA 批准,攜手 Jump、Jupiter 在 Solana 推受監管鏈上股票交易】 #DeFi#FINRA#Securitize Securitize 獲准成為首家託管證券的 broker-dealer,在 Solana 建立鏈上市場堆疊。 獲 FINRA 批准後,平台支援與穩定幣 atomic swaps,由 Jump 提供二級市場流動性。該方案消除傳統結算風險,使代幣化股票具備真實交易能力。 📍閱讀全文: https://abmedia.io/securitize-jump-trading-jupiter 📍 訂閱鏈新聞頻道:https://linktr.ee/abmedia.io

Crypto M - Crypto News

@CryptoM · Post #64995 · 10.04.2026 г., 13:15

🚀 Securitize Integrates Tokenized Assets with TRON Network Securitize, a platform specializing in the tokenization of real-world assets (RWA), has announced its integration with the TRON network. According to Foresight News, this development enables Securitize to introduce its tokenized funds and securities onto the TRON blockchain. This integration marks a significant step in expanding the accessibility and functionality of tokenized assets within the blockchain ecosystem. #Securitize#Tokenization#TRON#Blockchain#RWA#DigitalAssets#CryptoIntegration#TRX

Crypto M - Crypto News

@CryptoM · Post #64710 · 09.04.2026 г., 15:29

🚀 Securitize Appoints Brett Redfearn as President Amid $3.9 Billion Tokenized Asset Management Securitize has announced the appointment of Brett Redfearn, a former executive at the SEC and JPMorgan, as its new president. According to NS3.AI, Redfearn will also join the company's board of directors. This strategic move comes as Securitize manages $3.9 billion in tokenized assets, based on data from RWA.xyz. Redfearn's extensive experience in financial regulation and asset management is expected to bolster Securitize's leadership team and enhance its operations in the rapidly evolving digital asset sector. #Securitize#BrettRedfearn#TokenizedAssets#DigitalAssets#AssetManagement#FinancialRegulation#Leadership#Blockchain#FinTech

Crypto M - Crypto News

@CryptoM · Post #65049 · 10.04.2026 г., 16:29

🚀 Securitize's Potential Market Impact Highlighted by Benchmark Securitize is poised for significant growth as it prepares to go public through a merger with Cantor Equity Partners II, trading under the ticker SECZ. According to NS3.AI, Benchmark has reiterated a $16 price target for SECZ, emphasizing that capturing just one basis point of the approximately $44 trillion market value of NYSE-listed companies could more than double Securitize's current platform assets, which are roughly $4 billion. #Securitize#MarketImpact#IPO#CantorEquityPartners#SECZ#NS3AI#Benchmark#NYSE#Finance#Investment#StockMarket#Growth