From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32893 invoked by alias); 23 Oct 2017 12:25:28 -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 32884 invoked by uid 89); 23 Oct 2017 12:25:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=curated, measures, approximately, chart X-HELO: homiemail-a120.g.dreamhost.com Subject: Re: [PATCH] Improves __ieee754_exp() performance by greater than 5x on sparc/x86. To: Patrick McGehearty , libc-alpha@sourceware.org References: <1508172962-97543-1-git-send-email-patrick.mcgehearty@oracle.com> From: Siddhesh Poyarekar Message-ID: Date: Mon, 23 Oct 2017 12:25:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1508172962-97543-1-git-send-email-patrick.mcgehearty@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-10/txt/msg01079.txt.bz2 On Monday 16 October 2017 10:26 PM, Patrick McGehearty wrote: > The extreme max times for the old (ieee754) exp are due to the > multiprecision computation in the old algorithm when the true value is > very near 0.5 ulp away from an value representable in double > precision. The new algorithm does not take special measures for those > cases. The current glibc exp perf tests overrepresent those values. > Informal testing suggests approximately one in 200 cases might > invoke the high cost computation. The performance advantage of the new > algorithm for other values is still large but not as large as indicated > by the chart above. The inputs were curated such that the multiple precision ones were weeded out into separate tests to avoid seeing such deviations. This was based on the premise that the result precision for these inputs would be consistent (not necessarily the same) across platforms but that doesn't seem to be the case and some inputs seem to have sneaked in. On a related note, if we are comfortable dropping exp slow path, we should probably take a serious look at the log slow path too since IIRC I wasn't even able to trigger it after days of running the test and it's quite possible that nobody cares. We could drop it and see if anybody notices. Siddhesh