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: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,TVD_SUBJ_WIPE_DEBT shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id DAB0E1F953 for ; Wed, 10 Nov 2021 14:47:26 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 17DCA3858402 for ; Wed, 10 Nov 2021 14:47:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 17DCA3858402 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1636555646; bh=PBhWAWDulONDewBYQiwUzMssxw7jQIi+SliIqB2JoCQ=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=mZLguELuktTElvbGVofJHExPwqDQxhPzA9Eb0xNQjY5ew4p8Yeicmns1GbIUYg6FA 4T2yrQjhjAmcZnIkhb/wm+y3JOvtvaFfTeo4SN1Z02eq0X2K0Cj9uW0r+RNOD8OjJc pxfYiquPSqYDSqiO6NNyC7zWaZwQysIAIdUqEdeY= Received: from mail-ua1-x935.google.com (mail-ua1-x935.google.com [IPv6:2607:f8b0:4864:20::935]) by sourceware.org (Postfix) with ESMTPS id 4500F3858400 for ; Wed, 10 Nov 2021 14:47:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4500F3858400 Received: by mail-ua1-x935.google.com with SMTP id e10so5241193uab.3 for ; Wed, 10 Nov 2021 06:47:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=PBhWAWDulONDewBYQiwUzMssxw7jQIi+SliIqB2JoCQ=; b=NsiMt5IxLMTxsXE1ZdN3V+0/DclbUPwKeJDfu0LwB7ZLc/ok5zFIfDTJZu6O5eERYh bG98ufufY4QjBhtsxW7HvJ3Mk+foAJ0CjgTPlKixFoHiCIpHs6FMyeAVANvwfRKcsC+2 sVq7uIKSl+MD0mZz1w8kFkdxE65OeZyD5XDYxjYhztgH83IKKDka2dUImCqk48s219LY g1D3pC8xkI5Z0wgwWY1X8Jix6Fnskx5lBbzefYYZhrE7jnRABW1i6TFHo78QY/9wFCIj qT/2oZ7E5b0sN8jer6Lltu7V5b9bmpdhTCIgSfjAa/OAF0KSdIrc+iajCBaejgTdB5zE +Y+w== X-Gm-Message-State: AOAM532CutuF0jf7mXGtrZpejr1Zh//Z4tno+y+DIHDRoMMXfm3xM9bc qAB7h01pUuGtZMT2Kuut76bJhg== X-Google-Smtp-Source: ABdhPJx/TQ/L8HWIfaraatA/M3pKkNpK6NpglB/M1jZZucQCSXLFnl++8SGhB6NYQN/UJqwB44dZgQ== X-Received: by 2002:ab0:6808:: with SMTP id z8mr486188uar.130.1636555623795; Wed, 10 Nov 2021 06:47:03 -0800 (PST) Received: from ?IPV6:2804:431:c7cb:55a:73fa:8bad:ab14:14a3? ([2804:431:c7cb:55a:73fa:8bad:ab14:14a3]) by smtp.gmail.com with ESMTPSA id 92sm3497705uar.19.2021.11.10.06.47.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Nov 2021 06:47:03 -0800 (PST) Message-ID: <37a5bc8c-a9ec-952d-427e-62632f7f7a0a@linaro.org> Date: Wed, 10 Nov 2021 11:47:01 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [PATCH v3 5/7] math: Remove powerpc e_hypot Content-Language: en-US To: Wilco Dijkstra , "Paul A. Clarke" References: <20211101202059.1026032-1-adhemerval.zanella@linaro.org> <20211101202059.1026032-6-adhemerval.zanella@linaro.org> <20211109192800.GA4930@li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Adhemerval Zanella via Libc-alpha Reply-To: Adhemerval Zanella Cc: Tulio Magno Quites Machado Filho , "libc-alpha@sourceware.org" Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 10/11/2021 11:34, Wilco Dijkstra wrote: > Hi Paul, > >> The patches see poorer performance on Power10, also: > > Was that with the last patch to remove the redirects as well? The latest version > is still slower even with that on AArch64... > > I think the new algorithm will always be slower due to the dependent sqrt and > division. So it's hard to improve unless we only use it for special cases (eg. when > ax and ay are close). Returning sqrt (fma (ax, ax, ay * ay)) is about twice as fast > and gives just over 1 ULP, so we're losing a lot of performance for a small ULP > improvement. My main drive for this change is remove the arch-specific implementation in favor of an implementation that might be optimized better by the compiler without the need to extra hacks by arch-specific hooks (as I did for power7). So I used a more precise implementation, at least on paper it stated that with fma it might be overcome some performance implication of the more precise algorithm. Another option is to use the powerpc implementation which favor FP over integer as the default one.