From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) by sourceware.org (Postfix) with ESMTPS id 9F7143858D1E for ; Mon, 30 Jan 2023 13:26:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9F7143858D1E 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-x2c.google.com with SMTP id 586e51a60fabf-15f97c478a8so14889059fac.13 for ; Mon, 30 Jan 2023 05:26:22 -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:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=M+afJjAJ6Se7cptHkKuEawq89UwNbaVlZToKnmzkagk=; b=Lq2As0fqJSYLtFt3NVhKHWojrGAo1vELJbsf4J58+Nz6fqEdmKmlZ62n903CdOqEXJ wW0t5qt2t5a/kVhyfv04amJO17Ek6mU3WiPK5eujEM3/wk2Z3CZmbji4o1qKsGfuK7v2 eAWEQHGjJHEtV5rQmh8do6IqmezvdHYzH+UdX8FHwqtHE89y3mxS6BDwJEItlgvsEZ1O dL5qLAqkBaq1xibMWLjrSqSQQDeYUhx7d/JS5o/CojtF4+AIohy0cYc6QDj7tUBOi8Hr h3nzOZuV9JVB8C1Qy1kMS1vgd7mMcJS2Wct0Iq4MPN5skJuadLNiQbaN/zK3UvaQG7jZ eCPg== 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:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=M+afJjAJ6Se7cptHkKuEawq89UwNbaVlZToKnmzkagk=; b=X5ct1Fqa+xGKq5PrJ+C1Lg/b+Pgyi05z3ineoqGW0GUKV8WtN2VP+tOo8Su06VQuDM NvWi1I8LXZHJJp/j1LwKfy0496PZJOfZwNiYZZQd3J8XuwXnxpMuHm9g+9XUNMzxSzju 9+SWcg9teCRLd2OrUf/6fT6MWozeo/NBf5xRaBmE1SCjGQyRhZtWerIvE3qJMI5AzkUX vM3GgM0TAvfDIs1oYtn0Jrd+DvLLBZVfe8OwK2MAkt4bauaqzsV5Ji25m+yc760VS9kR HVqQitnTboc2ysczLGBVxb5fq2BX2+uMfH4gxCKyBR2sxnhuzhSTLAJFMXEPB7C9yYu8 HeiA== X-Gm-Message-State: AO0yUKXyClSijwbqZAV6TC3EICoKRvONbzUXr9VZlKgY9+3ZrGRs88xG sDqbMQEyeXRDW3Z6Dq2+k+Av5Q== X-Google-Smtp-Source: AK7set9FzjsB1CBLsOF05/BNeXbGnDqGfnN+nYQWj60moU2BQa8VhU47iUhka0GNw3xtOk7oP8A+nw== X-Received: by 2002:a05:6870:310c:b0:163:99b8:3a72 with SMTP id v12-20020a056870310c00b0016399b83a72mr3649184oaa.43.1675085181738; Mon, 30 Jan 2023 05:26:21 -0800 (PST) Received: from ?IPV6:2804:1b3:a7c2:1887:44d2:9434:baeb:b6d2? ([2804:1b3:a7c2:1887:44d2:9434:baeb:b6d2]) by smtp.gmail.com with ESMTPSA id nr9-20020a056870dc4900b00140d421445bsm5136625oab.11.2023.01.30.05.26.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Jan 2023 05:26:21 -0800 (PST) Message-ID: <00f4ac0a-0c0f-78c3-0d9b-7092d5f8fea5@linaro.org> Date: Mon, 30 Jan 2023 10:26:18 -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 v10 00/24] Improve generic string routines Content-Language: en-US To: Richard Henderson , Jeff Law , libc-alpha@sourceware.org References: <20230120211622.3445279-1-adhemerval.zanella@linaro.org> <77f4a99a-f7ba-9e84-6ef5-cae4cf874707@linaro.org> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <77f4a99a-f7ba-9e84-6ef5-cae4cf874707@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 27/01/23 16:36, Richard Henderson via Libc-alpha wrote: > On 1/20/23 13:00, Jeff Law via Libc-alpha wrote: >> You guys are making work for me! :) >> >> We've got hand-written RISC-V implementations of various str* and mem* routines that I nearly asked to get merged for glibc-2.37.  I held off thinking that there wasn't much benefit to including it in 2.37 vs 2.38.  Bad call on my part! > > In that you'll want to benchmark your hand-written code vs the new generic code with a string-fza.h file for riscv-zbb (orc.b) or xtheadbb (th.tstnbz)? > > After the benchmarking, I'm hoping you'll find that some of the hand-written code is no longer needed, and therefore won't accrue a maintenance burden going forward. > > > r~ I think for riscv it might be advantageous to reimplement string-fzi.h as well to check bits directly instead of using __builtin_c{t,l}z (similar to hppa).