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

Резултати

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

Пребарај: #cakewallet

当前筛选 #cakewallet清除筛选
Telegram & TON NEWS

@all_telegram_ton_news · Post #23280 · 28.02.2026 г., 12:55

🍰🚀Cake Wallet v6.0.0 is HERE! The Ultimate Privacy Powerhouse Just Got a Massive Upgrade!🥳 If you care even a little about privacy, freedom, and controlling your own money, Cake Wallet is now THE MUST-HAVE app on your phone. Period. This update takes it to a whole new level – sleek new design, lightning-fast features, and tools that scream "FREEDOM!" Let's dive into why this is a game-changer for Nostr users, freedom fighters, privacy enthusiasts, and anyone tired of Big Brother watching their wallet. 🕵️‍♂️🔒 1/ First off: Monero (XMR) Mastery – Cake Wallet has always been the king of Monero. Private by default, untraceable transactions, background sync, and automatic subaddresses. Send and receive XMR without leaving a trail. If you're a freedom fighter dodging surveillance or just value anonymity, this is your shield. No KYC, no BS. Just pure privacy. 🧡#Monero 2/ Bitcoin Silent Payments: Stealth Mode Activated!🤫 Bitcoin just got a privacy glow-up. Silent Payments let you receive BTC without reusing addresses – no more linking transactions to you. Combined with Payjoin for fee-saving, privacy-preserving sends. It's like Bitcoin on steroids for discretion. Perfect for those "off-the-grid" vibes. 3/ And NOW: Bitcoin Lightning Network via Spark!⚡💥 Instant, low-fee Bitcoin transactions? Yes! Zap sats across the globe in seconds without the high on-chain costs. This is HUGE for Nostr people – seamless zaps, tips, and micropayments on your favorite decentralized social network. Freedom fighters, rejoice: Fast, cheap, and private value transfer. No more waiting for confirmations. Zap that freedom! #Nostr#BitcoinLightning 4/ Built-in Swaps: Freedom to Trade Anywhere🔄 Swap XMR, BTC, ETH, LTC, ZEC, and more right in the app – no limits, no centralized exchanges spying on you. Jupiter DEX integration for Solana swaps, cross-chain bridges, and more. Go from BTC to XMR in taps. Privacy-preserving trades that keep your business YOUR business. Oh, and it's all non-custodial. Your keys, your coins. 🗝️ 5/ Zcash Shielded Privacy + More Chains🛡️ Added full Zcash support with auto-shielding and unified addresses. Plus Arbitrum, Base, BSC for low-fee EVM fun. Multi-chain without the hassle. For freedom tech lovers, this means more tools in your arsenal against censorship. 6/ Why It's a Must-Have for Nostr Folks & Freedom Fighters🌐 Nostr runs on Bitcoin and Lightning – Cake makes it effortless. Zap posts, support creators, all while keeping your wallet private with XMR swaps. Fighting for freedom? This app is built for you: Open-source, no data collection, Tor support, hardware wallet integration (Trezor, Ledger, BitBox). Duress PIN for safety. It's not just a wallet; it's a statement. 🫡 Update NOW: iOS, Android, Desktop. Free forever. Open-source. No telemetry. Download at https://cakewallet.com/ and taste the freedom! 🥲🫥🍰 What are you waiting for? Join the privacy revolution. #CakeWallet#Privacy#FreedomTech#Crypto (Shoutout to the Cake team for non-stop innovation! Sources: Cake Wallet GitHub releases and blog for v6.0.0 details.)