From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by sourceware.org (Postfix) with ESMTPS id EE94238346B8 for ; Thu, 2 Feb 2023 18:17:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EE94238346B8 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-16346330067so3600256fac.3 for ; Thu, 02 Feb 2023 10:17:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:organization:references:to :from:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=lVNNOyYRy9FQukSalHuGEIm5Qwasl4Rog8EuMrmrh+s=; b=p3W+HaV3Pj+140ObAaIffY6OuWHiqhZeS6nqXQxdz60r+x/miErd2q+Mxj2lyw04Yw jo6tQPWpaamD7tstx/YCU9EijTY78zK58ZJApUykW2gh6biCP4HZNBHuyjFCasSlm0J8 JRS0A/br7rIyxFqh9z9wowHpf2Qyj98LjMarkSkdXEaGpFpjk08S6rUj+2tDDhkIcYZ6 znMIzQI6UuXJITmANOLFgzn0JFRFRhMNLSyqXVROH4lZCRpS1wcjcFJ4kO40Yaa6fYdX El0b59y38rQjT/G7RgFX8TTNkOqNJ8+xkzR4JwICoQYV63YNpdXCh+AQEJvRaHeggjw4 aBWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:references:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lVNNOyYRy9FQukSalHuGEIm5Qwasl4Rog8EuMrmrh+s=; b=idHmMkSeMiPQ8p36qPCndcWJf8iMmtd5NdQaFfaOvXGSdx8jBl16vXg68i07P53nzV JVtSr7ZO7B2kHlSYcEyIfY1eKTvimocua4r1L2KMsKwJCoUiLdSPSbQx66OP2n4qk6TC 9YWwHP/xj41N7u0Av6l0+oBkey7L8aimwqA3r163PxDHZPD9+HOKmvd1Fec9Vn3v3FCa 2BtJpeCu1jirzO+zxnOR+j2U18U85sUWYzwHv7QNl2IfHxHvrlzDqGn1pLqsEU1M6y7B otWeuJR0YsUgcmBzC2KQ9AvojfvgLYRUYqxT+Nj2tIOqaKEOZWfqlTzWpC698LnSLweF m2Tg== X-Gm-Message-State: AO0yUKWJyJVqZtgRoz3pkchpFjT/kOCvqwyHA+Y9Gr2KpSvw1Up8e/LW Vo9IfpEOoask11OUbEKepLublRmz7HnADP+GCr0= X-Google-Smtp-Source: AK7set8pYbs3LEUDoFgmU731ENN8SvjA0wp7slewzG9I4LuUCxZLgYKw7Pc0Iyb1J5xSbd0engPfJw== X-Received: by 2002:a05:6870:e751:b0:163:1dac:5ad5 with SMTP id t17-20020a056870e75100b001631dac5ad5mr4554364oak.8.1675361849591; Thu, 02 Feb 2023 10:17:29 -0800 (PST) Received: from ?IPV6:2804:1b3:a7c2:1887:71e4:6a44:32a:be62? ([2804:1b3:a7c2:1887:71e4:6a44:32a:be62]) by smtp.gmail.com with ESMTPSA id e9-20020a4a8289000000b0051762a73553sm89257oog.18.2023.02.02.10.17.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Feb 2023 10:17:29 -0800 (PST) Message-ID: Date: Thu, 2 Feb 2023 15:17:26 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Subject: Re: [PATCH v12 00/31] Improve generic string routines Content-Language: en-US From: Adhemerval Zanella Netto To: libc-alpha@sourceware.org, Richard Henderson , Jeff Law , Xi Ruoyao , Noah Goldstein References: <20230202181149.2181553-1-adhemerval.zanella@linaro.org> Organization: Linaro In-Reply-To: <20230202181149.2181553-1-adhemerval.zanella@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 02/02/23 15:11, Adhemerval Zanella wrote: > It is done by: > > 1. Parametrizing the internal routines (for instance the find zero > in a word) so each architecture can reimplement without the need > to reimplement the whole routine. > > 2. Vectorizing more string implementations (for instance strcpy > and strcmp). > > 3. Change some implementations to use already possible optimized > ones (strnlen and strchr). It makes new ports to focus on > only provide optimized implementation of a hardful symbols > (for instance memchr) and make its improvement to be used in > a larger set of routines. > > I checked on x86_64-linux-gnu, i686-linux-gnu, powerpc-linux-gnu, > and powerpc64-linux-gnu by removing the arch-specific assembly > implementation and disabling multiarch (it covers both LE and BE > for 64 and 32 bits). I also checked the string routines on alpha, hppa, > and sh. > > Changes since v11: > * Use index_first_zero_ne strcmp/strncmp, and fixed it on LE. > * Added strrchr optimization based on strlen/memrchr. > * Reorder the patches so composed optimizations (such as strrchr) as > ordered later. To summarize, only the following patches are missing review: https://patchwork.sourceware.org/project/glibc/patch/20230202181149.2181553-8-adhemerval.zanella@linaro.org/ https://patchwork.sourceware.org/project/glibc/patch/20230202181149.2181553-9-adhemerval.zanella@linaro.org/ https://patchwork.sourceware.org/project/glibc/patch/20230202181149.2181553-13-adhemerval.zanella@linaro.org/ https://patchwork.sourceware.org/project/glibc/patch/20230202181149.2181553-15-adhemerval.zanella@linaro.org/ https://patchwork.sourceware.org/project/glibc/patch/20230202181149.2181553-32-adhemerval.zanella@linaro.org/