This is the mail archive of the
mailing list for the GCC project.
Re: The state of glibc libm
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Jeff Law <law at redhat dot com>, libc-alpha at sourceware dot org, gcc at gcc dot gnu dot org, Geert Bosch <bosch at adacore dot com>, Christoph Lauter <christoph dot lauter at lip6 dot fr>
- Date: Wed, 14 Mar 2012 21:51:44 +0100 (CET)
- Subject: Re: The state of glibc libm
- References: <Pine.LNX.email@example.com> <20120314143045.GG3804@xvii.vinc17.org> <4F60B64D.firstname.lastname@example.org> <Pine.LNX.email@example.com>
- Reply-to: gcc at gcc dot gnu dot org
On Wed, 14 Mar 2012, Joseph S. Myers wrote:
I'd say that "better performance with the potential loss of accuracy"
should be covered by -ffast-math - that GCC should generate direct use of
fsin/fcos instructions for sin/cos for -O2 -funsafe-math-optimizations on
x86_64, as it does on x86, unless there is some reason to think they would
perform worse than the out-of-line implementation.
Last time I did some timings (maybe 4 years ago), for double, fsin was
slower than the libm software implementation compiled for x87, which was
itself slower than the same implementation compiled for sse. And the
software implementation was more precise than fsin. My conclusion was to
ignore fsin from then on.