From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id 138FD3858D33 for ; Fri, 30 Jun 2023 23:28:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 138FD3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ot1-x330.google.com with SMTP id 46e09a7af769-6b5d5e6b086so1527712a34.1 for ; Fri, 30 Jun 2023 16:28:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688167679; x=1690759679; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6c7IMU5Jp6PqM0zfqQy5i+Vl0SYNxQqpM8ywFwB3L1E=; b=dCRJwxvFxMnGk+JberaE3UKqur/eS59mJrs4KoDHfGySyIHmZPKg3P7cDVmgRzueC/ L956b9eosOgl2+2fpmMa66KcSgUzphqMVIyP7u/MHWhYWM7SQWNpTKHjOmtELi61n4DG 6Xk+Qu8nqHiAQI3Ry/J7tEW7q0Koa1ktmXP94pvnlzALdIH8owu4kgehpRtZrBr2yZy5 wZga0LMUA/Xc+9CshGNGrbZTTPGt3PT0A/3GwmWzyQ+wcbGY7iVDRvwrCXEp7R6DV9Sw 1qLtt4cPbnrd7LJ7H2JeNRc7V2tEMX+a2/rRPPQvVCls1+Im+C46CDZ+0z2qvGuROqmt KqWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688167679; x=1690759679; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6c7IMU5Jp6PqM0zfqQy5i+Vl0SYNxQqpM8ywFwB3L1E=; b=MH3vUgk/NMPMxtHepqQ07TD1p7zP2fd36K0/JbLkPjWPQ57Ik2haLZr3mBWX7CO0Uh 2J5V3vu2wZ0jymAdHfcz2lwhYEqBw6pJf5Aea1vUzA93Ex0gOPGnYbCvo12oA+rzAWLw ruZ7HBhyIOL31Yvr+D/Yl+pmjPkhhsZ9Ds2v+Z1l9m8ZPbAbkzABHQut4+NKw58Ur9vD 0YSIfXPgN0BCP8jUw4Pr78V84rn+u9OJ9qMTM6Qy2PWLrhgnJnKEkXAfogoMtJz3k77c cDMUqguCS+HJ28jKBQem5uZn8cOPmoMgkmCH/Z5GJLzZVNpZ1t0MaKs/Detnv5iaklRS XDTQ== X-Gm-Message-State: AC+VfDw/CxxB5kMHrV79TKS6OvDovf+EV0rKv0Lg/jT270oBM3mKL5A1 bP1j0/vFxRmGEGCbA8PKH7rf5/3SWL7GNYVGtVNCifSj X-Google-Smtp-Source: ACHHUZ5HTj6sxS4+QVOq0J4zyx9NB/oY2B7d6+ryUuLwAw0hSLsO9nRg/xMW4S+kHWrN2k38l/d8vHXkQuJT9n4GI3E= X-Received: by 2002:a05:6830:26cf:b0:6b8:7d8a:8b79 with SMTP id m15-20020a05683026cf00b006b87d8a8b79mr4549500otu.10.1688167679302; Fri, 30 Jun 2023 16:27:59 -0700 (PDT) MIME-Version: 1.0 References: <20230630204812.2059831-1-skpgkp2@gmail.com> In-Reply-To: From: Noah Goldstein Date: Fri, 30 Jun 2023 18:27:47 -0500 Message-ID: Subject: Re: [PATCH] x86_64: Implement AVX2 version of strlcpy/wcslcpy function To: Sunil Pandey Cc: Paul Eggert , libc-alpha@sourceware.org, hjl.tools@gmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 Fri, Jun 30, 2023 at 6:22=E2=80=AFPM Noah Goldstein wrote: > > On Fri, Jun 30, 2023 at 5:21=E2=80=AFPM Sunil Pandey = wrote: > > > > > > > > On Fri, Jun 30, 2023 at 2:27=E2=80=AFPM Paul Eggert wrote: > >> > >> On 2023-06-30 14:04, Noah Goldstein via Libc-alpha wrote: > >> > Think we should at the very least wait for the generic strlcpy codes > >> > to land first. > >> > >> Let's not optimize these functions at all, unless there's good and > >> measured reason to do so. In practice I expected they're called with > >> small sizes for which optimization is a net minus as it consumes > >> valuable maintenance time with no real benefit. > > > > > > Hi Paul, > > > > Attached is strcpy/wcslcpy microbenchmark data based on Noah strlcpy/wc= slcpy microbenchmark patch. > > > I don't think the concern is that we can beat the generic impl (which has= n't > even landed yet AFAICT), it whether doing so makes sense given the > usage/goal of the functions. > That being said, I'm generally in favor of adding optimized versions since we happen to be a position where at least several developers find it worth their time to maintain, but not before the generic versions have landed. > > https://sourceware.org/pipermail/libc-alpha/2023-April/147557.html > > > > Thanks, > > Sunil