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

Резултати

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

Пребарај: #bulcoin

当前筛选 #bulcoin清除筛选
BLC Market - mini-app BulCoin

@bulcoin_blc · Post #258 · 23.02.2026 г., 17:00

If you're just considering BulCoin — here's what you can do right now: 1️⃣ Create a TON-wallet 2️⃣ Add BLC manually 3️⃣ Check trading pairs 4️⃣Find out what you can buy with BulCoin 5️⃣ Keep up with DAO decisions on our channel This is the system entry. BulCoin is being built as an infrastructure. And infrastructure requires participation. Those who enter earlier - understand the mechanics better. #BulCoin FAQ | BUY

Hashtags

BLC Market - mini-app BulCoin

@bulcoin_blc · Post #250 · 17.02.2026 г., 09:30

🟡 Why is BulCoin (BLC) needed at all BulCoin is not just a token. It's a part of infrastructure. Infrastructure where transactions are made without intermediaries. Without blockages. Without "permissions". We are creating an environment where: • value is transferred directly • calculations are made in digital form • participants interact without third parties Mini-app is the first step in using BLC. More to come. A free market is impossible without its own infrastructure. BulCoin is an element of such a system. #BulCoin FAQ | BUY

Hashtags

BLC Market - mini-app BulCoin

@bulcoin_blc · Post #261 · 25.02.2026 г., 11:00

🔥 We are opening the first round of BulCoin participants! 20 random participants will be selected. Each will receive 200 000 BLC. Additionally, a team of 50 early testers of the mini-app will be formed. Participation conditions: — subscription to the channel — comment under this post specifying your TON-address Results will be in 7 days. Results announcement date: 2026-03-04 at 20:00. This is the first stage of forming an active core of BulCoin. #giveaway#BulCoin FAQ | BUY

Асқарбиновая Орда

@askar4308 · Post #15265 · 25.02.2026 г., 17:07

🔥 We are opening the first round of BulCoin participants! 20 random participants will be selected. Each will receive 200 000 BLC. Additionally, a team of 50 early testers of the mini-app will be formed. Participation conditions: — subscription to the channel — comment under this post specifying your TON-address Results will be in 7 days. Results announcement date: 2026-03-04 at 20:00. This is the first stage of forming an active core of BulCoin. #giveaway#BulCoin FAQ | BUY

🔥 Мы открываем первый круг участников BulCoin! Будет выбрано 20 случайных участников. Каждый получит 200 000 BLC. Дополнительно формируется команда из 50 ранних тестеров mini-app. Условия участия: — подписка на канал — комментарий под этим постом указав свой TON-адрес Итоги — через 7 дней. Дата подведения итогов: 2026-03-04 в 20:00. Это первый этап формирования активного ядра BulCoin. #giveaway#BulCoin FAQ | Купить

BLC Market - mini-app BulCoin

@bulcoin_blc · Post #242 · 14.02.2026 г., 19:30

Why do you need BulCoin (BLC)? BulCoin is not just a token. It's an early stage of an ecosystem that is being built around: • a mini-game app • digital economy • early participant community The project is currently in the formation phase. It's at this stage that: — the core of the community is being formed — the first holders appear — history is being laid BulCoin (BLC) is a TON network token. In the coming months, a mini-app will be launched, where BLC will become the gaming currency. But the main thing is that early participants get more opportunities. We don't make loud promises. We are building the system step by step. If you have already created a wallet - you are prepared. It's going to be more interesting from here. #BulCoin#TON#DAO FAQ | BUY

BLC Market - mini-app BulCoin

@bulcoin_blc · Post #314 · 27.03.2026 г., 17:25

We continue to show what the BLC Market will look like. Currently, the basic logic of interaction within the app is under development: — user profile — task structure — navigation within the interface This is the first layer on which the entire system will be built. Next, we will show how exactly users will interact with each other. #freelance#community#BulCoin#BLC#TON FAQ | BUY

12
ПретходнаСтраница 1 од 2Следна