From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70499 invoked by alias); 8 Jun 2018 23:16:52 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 70484 invoked by uid 89); 8 Jun 2018 23:16:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=Hx-languages-length:1602, our X-HELO: mail3-relais-sop.national.inria.fr Received: from mail3-relais-sop.national.inria.fr (HELO mail3-relais-sop.national.inria.fr) (192.134.164.104) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 08 Jun 2018 23:16:50 +0000 Received: from ip-110.net-89-2-101.rev.numericable.fr (HELO stedding) ([89.2.101.110]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jun 2018 01:16:48 +0200 Date: Sat, 09 Jun 2018 15:32:00 -0000 From: Marc Glisse Reply-To: gcc@gcc.gnu.org To: Steve Ellcey cc: Richard Biener , pmenzel+gcc.gnu.org@molgen.mpg.de, GCC Development Subject: Re: How to get GCC on par with ICC? In-Reply-To: <1528494436.3449.36.camel@cavium.com> Message-ID: References: <1528494436.3449.36.camel@cavium.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT X-SW-Source: 2018-06/txt/msg00126.txt.bz2 On Fri, 8 Jun 2018, Steve Ellcey wrote: > On Thu, 2018-06-07 at 12:01 +0200, Richard Biener wrote: >>   >> When we do our own comparisons of GCC vs. ICC on benchmarks >> like SPEC CPU 2006/2017 ICC doesn't have a big lead over GCC >> (in fact it even trails in some benchmarks) unless you get to >> "SPEC tricks" like data structure re-organization optimizations that >> probably never apply in practice on real-world code (and people >> should fix such things at the source level being pointed at them >> via actually profiling their codes). > > Richard, > > I was wondering if you have any more details about these comparisions > you have done that you can share?  Compiler versions, options used, > hardware, etc  Also, were there any tests that stood out in terms of > icc outperforming GCC? > > I did a compare of SPEC 2017 rate using GCC 8.* (pre release) and > a recent ICC (2018.0.128?) on my desktop (Xeon CPU E5-1650 v4). > I used '-xHost -O3' for icc and '-march=native -mtune=native -O3' > for gcc. You should use -Ofast for gcc. As mentionned earlier in the discussion, ICC has some equivalent of -ffast-math by default. > The int rate numbers (running 1 copy only) were not too bad, GCC was > only about 2% slower and only 525.x264_r seemed way slower with GCC. > The fp rate numbers (again only 1 copy) showed a larger difference,  > around 20%.  521.wrf_r was more than twice as slow when compiled with > GCC instead of ICC and 503.bwaves_r and 510.parest_r also showed > significant slowdowns when compiled with GCC vs. ICC. -- Marc Glisse