This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/13932] x86_64 pow unexpectedly slow for some inputs
- From: "manu at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 11 Mar 2013 09:07:17 +0000
- Subject: [Bug math/13932] x86_64 pow unexpectedly slow for some inputs
- Auto-submitted: auto-generated
- References: <bug-13932-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13932
--- Comment #7 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2013-03-11 09:07:17 UTC ---
(In reply to comment #5)
> Nevertheless, I've added patches to master that ought to improve performance by
> at least 4x in the worst case, bringing it close to mpfr performance (still
> 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.html
http://www.dctsystems.co.uk/Software/power.html
http://martin.ankerl.com/2012/01/25/optimized-approximative-pow-in-c-and-cpp/
I am no expert in IEEE floating-point arithmetic, so it may well be that those
implementations produce extremely bad approximations for some inputs. Is that
the case?
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.