From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.cs.ucla.edu (mail.cs.ucla.edu [131.179.128.66]) by sourceware.org (Postfix) with ESMTPS id 149FD3858436 for ; Mon, 3 Jul 2023 23:12:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 149FD3858436 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=cs.ucla.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.ucla.edu Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 5E2833C011BD5; Mon, 3 Jul 2023 16:12:46 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id WxvGcO6pOZUR; Mon, 3 Jul 2023 16:12:46 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 207FD3C011BD6; Mon, 3 Jul 2023 16:12:46 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 207FD3C011BD6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1688425966; bh=Ro2vkmbNmf82FEeaqL6oitWNMSd2ug9L9hXPT3Ruz3Y=; h=Message-ID:Date:MIME-Version:To:From; b=OKWRnNFb1RP+5wWzAzGppEfasnYyGbUDI7q2+2WL1qZ12EJrY2QGsevgSEIelFqR3 7VQFrQaaMEtt1t7xOOyD+yBf1YtvaNo8g8vA0mljqviaM+YgpBTu0r8ZulF43OnTvd RJWERaTeirMkDHWsotAaEhKznr9Y93iucKb6ZswfQLYmfSc4SPSbZce1v9z87KWMWZ SG627M/7sWfnEHfA/JxnHfrwwN7T8UOyd9KpxYcVuvFAKiOf5J+V5HJs+tWFv3s0V5 4lN21s49Oj9GF08ux9jjbhnvZBVazGmyIPzo7xTmDipXlWoOyr2N5N6wu6UuDKvZJ5 LIDpWA0m7eGSw== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id oUyb_bD6mlkA; Mon, 3 Jul 2023 16:12:46 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id E54433C011BD5; Mon, 3 Jul 2023 16:12:45 -0700 (PDT) Message-ID: <59eac4a2-409e-5083-ce09-e81f436a1adc@cs.ucla.edu> Date: Mon, 3 Jul 2023 16:12:45 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US To: Gabriel Ravier , Noah Goldstein Cc: Sunil Pandey , libc-alpha@sourceware.org, hjl.tools@gmail.com References: <20230630204812.2059831-1-skpgkp2@gmail.com> <78aabdcb-bae8-abed-4ad1-ff9cc0285eab@cs.ucla.edu> <1d33880b-61f5-cb03-193c-fe8ae92c8649@gmail.com> From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: [PATCH] x86_64: Implement AVX2 version of strlcpy/wcslcpy function In-Reply-To: <1d33880b-61f5-cb03-193c-fe8ae92c8649@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,NICE_REPLY_A,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 2023-07-03 15:04, Gabriel Ravier wrote: > OpenBSD's tree has 4997 occurrences of it Many years ago the OpenBSD team went through its source code and replaced uses of strcpy with strlcpy, without much thought involved and even introducing problems in the process. I expect that not much of this code is used elsewhere and it's not that relevant to glibc. Of the little OpenBSDish code that is relevant (notably OpenSSH) I expect the performance difference to be so small as to not be worth optimizating glibc. Real-worldish benchmarks could help check this.