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

Резултати

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

Пребарај: #stablecoin

当前筛选 #stablecoin清除筛选
CryptoBull_360™

@cryptobull_360 · Post #49130 · 08.04.2026 г., 14:34

💼 Ethereum Foundation to Convert 5,000 ETH Into Stablecoins The Ethereum Foundation announced via X that it will convert 5,000 ETH into stablecoins using CoW DAO’s TWAP feature to fund R&D, grants, and donations. #stablecoinlink

Hashtags

PaxosGlobal

@PaxosGlobal · Post #8 · 04.04.2019 г., 19:47

Paxos Trust is committed to bringing trust and transparency to the digital asset industry. See all of our monthly attestation reports on $PAX by top auditing firm @Withum. As of March 29, total funds of $118,048,457.66 USD and $PAX #stablecoin match exactly https://www.paxos.com/attestation/

Hashtags

Tether

@tether · Post #46 · 04.08.2021 г., 09:18

Stablecoin yields, mainly generated via lending and borrowing activities, have become a topic of interest among traders, and you should join the conversation! Learn more about #tether tokens and other #stablecoin yields⬇️ https://tether.to/where-do-stablecoin-yields-come-from/

TokenPocket

@tokenpocket_channel · Post #1662 · 06.08.2025 г., 07:42

📝 TokenPocket Monthly Report — July 2025 → https://medium.com/@tokenpocket-gm/tokenpocket-monthly-report-july-2025-90a2476b9237 In July, TokenPocket focused on technological innovation and community activities, launching a series of measures centered around multi-chain functionality upgrades and enhanced security protection. 🎯#StablecoinWallet TokenPocket provides the Gas Station service for the TRON network and the zero-fee USDT/USD1 transfer service on BNBCHAIN. This significantly reduces your #stablecoin transaction fee costs and enhances your trading experience. 🎯 LetsBONK on TokenPocket Track all the trending LetsBonk tokens effortlessly, all in one place. 🎯 Supported XRP, HashKey Chain, and ink networks, making TokenPocket your first choice for a multi-chain wallet. 📍 All In One, All in TokenPocket 🔗https://tp.xyz

QIN2DIM's Tech Channel

@qin2dim · Post #1229 · 16.07.2025 г., 12:27

#blog#stablecoin ┃ 透视稳定币:从 BIS 报告看未来货币的铁律 稳定币的浪潮已非预言,而是现实。拨开市场的喧嚣与迷雾,我们看到的不只是风险,更是一场关乎未来货币秩序的全球性大混战。 原文链接:Blog 频道:@QIN2DIM's Tech Channel

Crypto Media

@crypto_medias · Post #1864 · 19.07.2025 г., 18:58

🔥🤩🤞 🗣#USDC Circle CEO says stablecoins now let people transact like messaging on WhatsApp, and major institutions agree stablecoins are the future of global money movement. #stablecoin

TONlines – News

@tonlines · Post #6805 · 17.04.2025 г., 08:31

⚡️The Daily TON: Ethena Brings Innovative Stablecoin to the Ecosystem #Ethena#stablecoin#TON The Ethena project plans to enter the TON ecosystem, introducing its unique stablecoin USDe. Unlike traditional stablecoins, USDe uses a hedging strategy to manage volatility, offering users potential yields on their holdings. The project aims to integrate with blockchain ecosystems, including a Telegram mini-app for broader accessibility. Source: link @tonlines

123•••89
ПретходнаСтраница 1 од 9Следна