@Dwflabs · Post #16 · 22.08.2022 г., 04:37
The future is always bright for those who can paint it with the colours of ambition, confidence, and positivity; with the right partner to support such a vision. #dwflabs#venturecapital#marketmaking
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
Пребарај: #dwflabs
@Dwflabs · Post #16 · 22.08.2022 г., 04:37
The future is always bright for those who can paint it with the colours of ambition, confidence, and positivity; with the right partner to support such a vision. #dwflabs#venturecapital#marketmaking
@Dwflabs · Post #15 · 15.08.2022 г., 07:15
The market goes up. The market goes down. In times of uncertainty, seek the right partner. The one able to guide you through the most difficult decisions. #dwflabs#venturecapital#marketmaking
@DWFLabs · Post #800 · 02.09.2024 г., 08:43
Our Business Partner of Business Development Lingling Jiang is sharing on our work and support for the space 🙌🔥 If you're around, come say hi to the team! #KSL2024#KBW2024#DWFLabs
@DWFLabs · Post #725 · 26.06.2024 г., 13:57
Could you decipher where we are? 😁 Our Business Partner of Ecosystems, Alessia Baumgartner is taking the stage soon. If you're around and would like to hear more about what we look for in projects, come join us 🔥 #Decipher2024#Algorand#DWFLabs
Hashtags
@spotonchain · Post #867 · 20.06.2024 г., 10:11
$LISTA was just listed on several exchanges with a starting price of $0.565! Note that DWF Labs (@DWFLabs) appears to be an MM of @lista_dao. In the past 2 days prior to the listing, DWF Labs received 10M $LISTA from the project and has been transferring the tokens to CEX, including: • 2.5M $LISTA to #Bitget • 2M $LISTA to #Binance • 1.5M $LISTA to #MEXC • 850K $LISTA to #Gateio • 850K $LISTA to #KuCoin Follow @spotonchain and set alerts for the #DWFLabs entity via https://platform.spotonchain.ai/en/platform/entity/122?tokens=LISTA&min_amount=1
@Dwflabs · Post #46 · 13.10.2022 г., 11:31
The Crypto Oasis Ecosystem Report 2022 for the UAE is now LIVE and DWF Labs is a part of it. Download your copy here https://t.ly/orEH #CryptoOasis#EcosystemReport#dwflabs#marketmaking#crypto