From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 402BF1F453 for ; Tue, 5 Feb 2019 19:33:46 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:cc:references:from:subject:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=m5KOraYYIUjLY/Bc Te5yJCQ8wiuZkvh3QdZwFPHROkufZD3RCnp1hLTtzbv+DJhJb7fqJGjJX3pdu0n+ Jen+etSrOvHC+LPh6AcwPyxxfkBOoASr/MJCuGPC5+mhr7x06s3n4h3N5gX8YtUn gBblz6D0HDkgPs1hL0U4VLQrjlI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:cc:references:from:subject:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=iF/wK7rlhNRsA+axe4DPLg JC+sI=; b=i5WK4pK/hZEEC4pSnscWHVe75xzxq1m8Szczg9LscDXbxLXAAO2iXP +iNsfdXgluU/yYUcc+pQ6SiYS/zV0N2Nq8cSV56KDVH0/jYehKzvhK7Z0EciB+Kw JzKHLH7ZKzNFC/kjx7daTH+S+QaxDrAVMTHSoGv6r2MKfa6+Eemrg= Received: (qmail 7905 invoked by alias); 5 Feb 2019 19:33:44 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 7896 invoked by uid 89); 5 Feb 2019 19:33:43 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-qt1-f196.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=to:cc:references:from:openpgp:autocrypt:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Aws+j69QCzVcUSMjOX32Hv5e4rsYTvXHuTAIYTvV+AY=; b=UtKHA2DZ05DQaNjHBGOxNMJ7lISLvFsddUzzTw/HulIq96GEO2dEAhBmUvH/NiIMDW Uiigi0uwb8cFvSQPdaaJrfA/2PvMUJNOjnh7FNBPBfjr+Ha7zM18EEo61JhjojZNhQJG XpH5d1/SfRfh34Xxnf/QOS03OpyKELbuKFSVbRAVY4Epi7xTnioKPYmapNYKaKG7OzA/ c1y1h2ehuq+/6og7Q0Ay3K0DuVZSAOib7nlU2ePPVFNysyZfEzXji701+i7l7dFUR7pE M++rAYhE5ffzSeKpsV1quQwqTMlyBLip89ay4I3dyHriM8nfhJaSC8zwxwN805Ji4MwP Kq+Q== To: Wilco Dijkstra , 'GNU C Library' Cc: nd References: <49967cf5-a89a-fa17-5c94-556c92705bef@linaro.org> From: Adhemerval Zanella Openpgp: preference=signencrypt Subject: Re: [PATCH] Improve string benchtests Message-ID: <1dc12364-668c-0216-a569-295a0c1f394f@linaro.org> Date: Tue, 5 Feb 2019 17:33:33 -0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 05/02/2019 13:17, Wilco Dijkstra wrote: > Hi Adhemerval, > >> Space after cast. As a side note, this won't evaluate wstpcpy as-is, since it >> will use an optimized version and it will result in a wrong generic name for >> wcscpy. > > I'll have a look at that. Maybe we could create GENERIC_STPCPY from > concatenation of the STPCPY define. I want to avoid huge amounts of defines > leading to completely incomprehensible magic. > >> And as a following cleanup for wcpcpy we can use the similar code for strcpy >> adjusting for wide-chars: > > Sure, there are lots of generic string functions which aren't optimized yet. However > that's a different patch... This patch simply makes it easy to find those cases. The idea was not make is a pre-requisite, but rather an idea for a different patch indeed. > >> Same as before for wcpncpy: instead of reimplement the generic implementation >> on benchtests we can just include them. And it also leads to an possible >> optimization on generic implementation for wcpncpy. > > The point is to enable useful comparisons of string implementations. If we include > the generic implementation then we just compare the generic implementation with > itself in many cases. And that isn't useful. If I change a generic implementation I > want to see the difference that makes in the benchmark comparison rather than > showing no difference. My understanding is we have the generic implementation as the baseline where arch-specific optimization might be applied and the idea of the comparison is to check against it. I see no point in using a different implementation on benchtests, it should compare against exactly what glibc is currently providing. If you want to check if the your changes improves the generic, you can compare against multiples glibc builds. > > Maybe the name generic_xxx is confusing? It's meant to be the baseline, > something which you should beat in all cases with the actual implementation. My understanding is the baseline should be the generic implementation which is selected if the architecture does not provide an optimized one. > > Cheers, > Wilco >   >