@gourmeturbano · Post #20624 · 03.08.2025 г., 23:24
#VENEZUELA#EMBUTIDOS🌭 | Plumrose lideró ranking de marcas 2025 en categoría de embutidos https://ift.tt/d1FHIDE August 03, 2025 at 06:30PM
Hashtags
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
Пребарај: #embutidos
@gourmeturbano · Post #20624 · 03.08.2025 г., 23:24
#VENEZUELA#EMBUTIDOS🌭 | Plumrose lideró ranking de marcas 2025 en categoría de embutidos https://ift.tt/d1FHIDE August 03, 2025 at 06:30PM
Hashtags
@gourmeturbano · Post #20587 · 30.07.2025 г., 18:24
#EMBUTIDOS#VENEZUELA🌭 | Plumrose lanza nuevos empaques de salchichas con la mejor calidad y el máximo sabor https://ift.tt/1AEtILq July 30, 2025 at 02:00PM
Hashtags
@gourmeturbano · Post #20568 · 28.06.2025 г., 14:24
#VENEZUELA#EMBUTIDOS🌭 | La Montserratina agradece respaldo de periodistas a su legado de sabor https://ift.tt/cQm6ZPg June 28, 2025 at 10:00AM
Hashtags
@gourmeturbano · Post #20555 · 26.06.2025 г., 20:24
#VENEZUELA#EMBUTIDOS🌭 | Don Diego transforma la mesa venezolana con calidad y precios imbatibles. https://ift.tt/DF8oEfz June 26, 2025 at 04:00PM
Hashtags
@gourmeturbano · Post #20543 · 25.06.2025 г., 17:24
#VENEZUELA#EMBUTIDOS🌭 | Salchichas La Montserratina: puro fuego de tradición y sabor en casa https://ift.tt/fV9QeyP June 25, 2025 at 12:30PM
Hashtags
@gourmeturbano · Post #20520 · 20.06.2025 г., 18:24
#VENEZUELA#EMBUTIDOS🌭 | La Montserratina transforma el mercado con calidad y creatividad https://ift.tt/kDS24hd June 20, 2025 at 01:45PM
Hashtags
@gourmeturbano · Post #20508 · 19.06.2025 г., 08:24
#VENEZUELA#EMBUTIDOS🌭📉 | La Montserratina comparte las tendencias en el mercado venezolano de embutidos https://ift.tt/SZEkiXI June 19, 2025 at 04:00AM
Hashtags
@gourmeturbano · Post #20501 · 18.06.2025 г., 12:24
#VENEZUELA#EMBUTIDOS🌭 | Experiencia Morcidela 400 gramos: prueba el sabor único de "La Negrita" Plumrose https://ift.tt/dfQrCnq June 18, 2025 at 08:00AM
Hashtags
@gourmeturbano · Post #20470 · 06.05.2025 г., 21:24
#VENEZUELA#EMBUTIDOS🌭 | La Montserratina impulsa su versatilidad con la diversificación de sus targets https://ift.tt/Npxu8lt May 06, 2025 at 04:29PM
Hashtags
@gourmeturbano · Post #20411 · 03.04.2025 г., 17:24
#VENEZUELA#EMBUTIDOS🌭 | En el Mes de la Morcilla: conoce los grandes aportes de este embutido a tu salud https://ift.tt/WLGtJ2r April 03, 2025 at 01:15PM
Hashtags
@gourmeturbano · Post #20335 · 25.03.2025 г., 18:24
#VENEZUELA#EMBUTIDOS🌭 | La Montserratina: “las experiencias de marca son conexiones emocionales memorables” https://ift.tt/PqSsIVU March 25, 2025 at 02:00PM
Hashtags
@gourmeturbano · Post #20301 · 21.03.2025 г., 22:24
#EMBUTIDOS#VENEZUELA🌭 | Chistorra La Montserratina: conoce los factores claves de su irresistible sabor https://ift.tt/B6Wuoaj March 21, 2025 at 06:15PM
Hashtags