@Dogdata · Post #2235 · 20.07.2020 г., 21:05
#Bone live on Coingecko🚀🧨 👉https://www.coingecko.com/en/coins/bone #DogData🐾
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
Пребарај: #dogdata
@Dogdata · Post #2235 · 20.07.2020 г., 21:05
#Bone live on Coingecko🚀🧨 👉https://www.coingecko.com/en/coins/bone #DogData🐾
@Dogdata · Post #2316 · 31.07.2020 г., 17:09
Happy #EidMubarak Best wishes for all DogData Muslim Community Thank you for your kind support 🙏 #DogData#Dogs#EidMubarak 🤩🚀📈😍🤩🚀📈😍🤩🚀📈
Hashtags
@Dogdata · Post #2394 · 14.08.2020 г., 11:08
DogData community🐾 Support us and vote for DogData🙏🐾 Please tag 👇 @FaceBook4Dog#ethbn#bone#dogdata https://twitter.com/gate_io/status/1293863802019119105?s=09 👆👆👆
@Dogdata · Post #2392 · 13.08.2020 г., 19:17
DogData community🐾 Everyone should be interested in getting this. Let's show that we are big, let's show that our community is huge ❗️❗️ Support us and vote for DogData🙏🐾 Please tag 👇 @FaceBook4Dog#ethbn#bone#dogdata https://twitter.com/gate_io/status/1293863802019119105?s=09 👆👆👆
@dogdata · Post #4351 · 08.11.2023 г., 07:01
Let’s bring the Dogs Data to TikTok Join the 🐾 TikTok community Like and share our videos their whenever you can https://www.tiktok.com/@kennel.ai?_t=8h0SUOsjUHI #DogData #$DOGS #Web3#DogBreeder#DogNFT
Hashtags
@dogdata · Post #4338 · 02.11.2023 г., 07:01
Let’s bring the Dogs Data to TikTok Join the 🐾 TikTok community Like and share our videos their whenever you can https://www.tiktok.com/@kennel.ai?_t=8h0SUOsjUHI #DogData #$DOGS #Web3#DogBreeder#DogNFT
Hashtags
@Dogdata · Post #2434 · 19.08.2020 г., 05:32
This is the first of the articles on DogData👏👏 #ETHBN#dogdata#publish0x 👉https://www.publish0x.com/dogdata/mydogdata-xnlwvqz Please rate this article👍🐾
Hashtags
@Dogdata · Post #2497 · 09.09.2020 г., 13:47
💸DogData Wallet 💸 🗓Launched This Week All who registered on the DogData web page should feel free to check up their DogData wallet 🚀 👉https://t.co/JNmxHEyQWw #DogData#Dogs#wallet#cryptocurrencyhttps://t.co/In7tQYMYio
@Dogdata · Post #2453 · 25.08.2020 г., 08:50
🚨Amazing news!📢 We were chosen to be listed on Bitforex CApp!😱🚀 #DogData#Bitforex#Capp
@Dogdata · Post #2271 · 26.07.2020 г., 09:28
🚨🚨TODAY 🚨🚨 #26 July 2020 LIVE AMA🤩📣 #DogData CFO Thomas Melchior With the support #EXCOINCIAL Team 🔴Get your questions prepared. 🔴 Maximum 2 questions per person. THE EVENT HOSTED ON #AFRICUNIA TV Facebook: https://www.facebook.com/africuniatv Instagram: https://www.instagram.com/africuniatv Zoom: https://zoom.us/j/6331039454
Hashtags
@dogdata · Post #4371 · 12.12.2023 г., 07:31
$Dogs token is the governance token for Kennel.Ai platform Web3 on chain platform Where pet dog breeders can tokenise pet dogs using NFT Blockchain is the best way to decentralise dog data Blockchain has created for pet dog breeders the opportunity to manage the industry themselves instead of having to pay and being governed by a centralised organisation #DogData#FCI#DogBreeder#blockchain#Decentralised
@dogdata · Post #4360 · 23.11.2023 г., 07:01
$Dogs token is the governance token for Kennel.Ai platform Web3 on chain platform Where pet dog breeders can tokenise pet dogs using NFT Blockchain is the best way to decentralise dog data Blockchain has created for pet dog breeders the opportunity to manage the industry themselves instead of having to pay and being governed by a centralised organisation #DogData#FCI#DogBreeder#blockchain#Decentralised