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

Резултати

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

Пребарај: #bybit

当前筛选 #bybit清除筛选
Gong Jiao Wei 巩娇玮

@gongjiaoweiy · Post #68898 · 26.02.2026 г., 02:47

15 hours ago, Antalpha (@AntalphaGlobal) sent 1,000 $XAUT (~$5.16M) into #Bybit, likely to sell. https://intel.arkm.com/explorer/entity/antalpha https://x.com/OnchainLens/status/2026838079651328216 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5712 · 04.03.2026 г., 13:25

A newly created wallet withdrew 500 $XAUT worth $2.57M from #Bybit. Address: 0xbe9De876a5Cf802F574899A2763aE6a5D5D93CBa https://x.com/OnchainLens/status/2029186288763715651 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5634 · 26.02.2026 г., 01:54

15 hours ago, Antalpha (@AntalphaGlobal) sent 1,000 $XAUT (~$5.16M) into #Bybit, likely to sell. https://intel.arkm.com/explorer/entity/antalpha https://x.com/OnchainLens/status/2026838079651328216 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5563 · 21.02.2026 г., 01:32

13 hours ago, Antalpha (@AntalphaGlobal) sent 1,000 $XAUT (~$5M) into #Bybit, likely to sell. They still hold 59,033 $XAUT (~$300.69M). https://intel.arkm.com/explorer/entity/antalpha https://x.com/OnchainLens/status/2025020760608440597 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5283 · 02.02.2026 г., 04:49

A whale withdrew 593.98 $XAUT worth ($2.78M) from #Bybit in the past 3 days after being dormant for 8 months. Address - 0x57655B342B7bf1a1134B572e43eB62BBE56BF7CF Data - @nansen_ai https://x.com/OnchainLens/status/2018184847295218173 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5215 · 29.01.2026 г., 06:17

The newly created wallet "0x0E4" further withdrew 450 $XAUT worth ($2.51M)from #Bybit. Now the whale holds 1.25K $XAUT worth $6.98M Address - 0x0E4F3ed5B2A3dB2A2940c638418530e9f5c4927E Data - @nansen_ai https://x.com/OnchainLens/status/2016757455565574543 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5165 · 26.01.2026 г., 06:53

The whale "0x0a5" bought 602.49 $XAUT, worth $3.05M, from #Bybit. Over the past 4 days, the whale has bought 1,469.29 $XAUT, worth $7.33M, from #Bybit. https://intel.arkm.com/explorer/address/0x0a5e3968f95d5aD4Fac72E1420A2BFFeedb7cbEB https://x.com/OnchainLens/status/2015679418803552716 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5151 · 25.01.2026 г., 10:58

A wallet linked to the Pendle Team (@pendle_fi) deposited 1.8M $PENDLE, worth $3.61M, into #Bybit after holding it for 3-4 years. The wallet received these $PENDLE for $266K from the Pendle Vesting Wallet. Address: 0xf82e1E9381A1d92B5897eBe2F9B61160222f1aeb https://x.com/OnchainLens/status/2015378723818942854 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5145 · 23.01.2026 г., 12:15

A whale bought 566.80 $XAUT worth ($2.79M) from #Bybit in the past 2 days. The whale still hold $11.36M $USDT and likely to buy more. Address - 0x0a5e3968f95d5aD4Fac72E1420A2BFFeedb7cbEB Data - @nansen_ai https://x.com/OnchainLens/status/2014673139159240920 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5137 · 23.01.2026 г., 05:33

A whale deposited 665,035 $HYPE, worth $14.54M into #Bybit, making a profit of $7.04M. The whale initially bought 651,895 $HYPE for $7.5M at a price of $11.5, between Dec 3, 2024, and Dec 8, 2024, and sent it for staking. https://hyperbot.network/trader/0xffe664491482ae9db6ba9e55c2ed1ea55c700a52 https://hyperevmscan.io/address/0xffe664491482ae9db6ba9e55c2ed1ea55c700a52 https://x.com/OnchainLens/status/2014571958009250155 Follow @onchainlens for more onchain updates

Hashtags

Onchain Lens Channel

@OnchainLens · Post #5136 · 23.01.2026 г., 01:44

A wallet linked to the Pendle Team (@pendle_fi) deposited 1.8M $PENDLE, worth $3.84M, into #Bybit after holding it for 3 years. The wallet received these $PENDLE for $266K from the Pendle Vesting Wallet. Address: 0x6b4166974fcf730d7933656d26d52922ee285cf0 https://x.com/OnchainLens/status/2014514593566248989 Follow @onchainlens for more onchain updates

Hashtags

123•••10•••1920
ПретходнаСтраница 1 од 20Следна