From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80992 invoked by alias); 22 Mar 2018 22:15:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 65076 invoked by uid 89); 22 Mar 2018 22:15:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Thu, 22 Mar 2018 22:15:00 -0000 From: Joseph Myers To: Wilco Dijkstra CC: "libc-alpha@sourceware.org" , nd Subject: Re: [PATCH 2/7] sin/cos slow paths: remove large range reduction In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2018-03/txt/msg00523.txt.bz2 On Wed, 21 Mar 2018, Wilco Dijkstra wrote: > This patch removes the large range reduction code and defers to the huge range > reduction code. The first level range reducer supports inputs up to 2^27, > which is way too large given that inputs for sin/cos are typically small > (< 10), and optimizing for a smaller range would give a significant speedup. > > Input values above 2^27 are practically never used, so there is no reason for > supporting range reduction between 2^27 and 2^48. Removing it significantly > simplifies code and enables further speedups. There is about a 2.3x slowdown > in this range due to __branred being extremely slow (a better algorithm could > easily more than double performance). OK. -- Joseph S. Myers joseph@codesourcery.com