This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to get GCC on par with ICC?
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: "mjambor at suse dot cz" <mjambor at suse dot cz>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, nd <nd at arm dot com>, Steve Ellcey <sellcey at cavium dot com>, Richard Biener <richard dot guenther at gmail dot com>, "pmenzel+gcc dot gnu dot org at molgen dot mpg dot de" <pmenzel+gcc dot gnu dot org at molgen dot mpg dot de>
- Date: Fri, 15 Jun 2018 11:39:18 +0000
- Subject: Re: How to get GCC on par with ICC?
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Martin wrote:
> Keep in mind that when discussing FP benchmarks, the used math library
> can be (almost) as important as the compiler. In the case of 481.wrf,
> we found that the GCC 8 + glibc 2.26 (so the "out-of-the box" GNU)
> performance is about 70% of ICC's. When we just linked against AMD's
> libm, we got to 83%. When we instructed GCC to generate calls to Intel's
> SVML library and linked against it, we got to 91%. Using both SVML and
> AMD's libm, we achieved 93%.
>
> That means that there likely still is 7% to be gained from more clever
> optimizations in GCC but the real problem is in GNU libm. And 481.wrf
> is perhaps the most extreme example but definitely not the only one.
You really should retry with GLIBC 2.27 since several key math functions were
rewritten from scratch by Szabolcs Nagy (all in generic C code), resulting in huge
performance gains on all targets (eg. wrf improved over 50%).
I fixed several double precision functions in current GLIBC to avoid extremely bad
performance which had been complained about for years. There are more math
functions on the way, so the GNU libm will not only catch up, but become the fastest
math library available.
Wilco