From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12125 invoked by alias); 11 Mar 2013 09:07:37 -0000 Received: (qmail 12071 invoked by uid 48); 11 Mar 2013 09:07:19 -0000 From: "manu at gcc dot gnu.org" To: glibc-bugs@sourceware.org Subject: [Bug math/13932] x86_64 pow unexpectedly slow for some inputs Date: Mon, 11 Mar 2013 09:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: math X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: siddhesh at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2013-03/txt/msg00047.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=3D13932 --- Comment #7 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez 2013-03-11 09:07:17 UTC --- (In reply to comment #5) > Nevertheless, I've added patches to master that ought to improve performa= nce by > at least 4x in the worst case, bringing it close to mpfr performance (sti= ll > about 2x slower though). There's still scope to make it faster, which is= why I > haven't closed this bug yet. Hi, thanks for your work. Personally, I would be interested to have a pow version that is perhaps less precise but that does not have such nasty corner-cases. A 4x improvement is nice, but given that the worst-case may be 12,000x slower, it is not a definitive solution. There are some implementations on the net that perhaps could be used when -ffast-math is given? http://jrfonseca.blogspot.be/2008/09/fast-sse2-pow-tables-or-polynomials.ht= ml http://www.dctsystems.co.uk/Software/power.html http://martin.ankerl.com/2012/01/25/optimized-approximative-pow-in-c-and-cp= p/ I am no expert in IEEE floating-point arithmetic, so it may well be that th= ose implementations produce extremely bad approximations for some inputs. Is th= at the case? --=20 Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=3Demail ------- You are receiving this mail because: ------- You are on the CC list for the bug.