From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21714 invoked by alias); 15 Mar 2004 03:01:53 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 21672 invoked from network); 15 Mar 2004 03:01:52 -0000 Received: from unknown (HELO uniton.integrable-solutions.net) (62.212.99.186) by sources.redhat.com with SMTP; 15 Mar 2004 03:01:52 -0000 Received: from uniton.integrable-solutions.net (localhost [127.0.0.1]) by uniton.integrable-solutions.net (8.12.3/8.12.3/SuSE Linux 0.6) with ESMTP id i2F2pF9b013723; Mon, 15 Mar 2004 03:51:15 +0100 Received: (from gdr@localhost) by uniton.integrable-solutions.net (8.12.3/8.12.3/Submit) id i2F2pEJk013722; Mon, 15 Mar 2004 03:51:14 +0100 X-Authentication-Warning: uniton.integrable-solutions.net: gdr set sender to gdr@integrable-solutions.net using -f To: Roger Sayle Cc: Scott Robert Ladd , gcc@gcc.gnu.org Subject: Re: GCC viciously beaten by ICC in trig test! References: From: Gabriel Dos Reis In-Reply-To: Organization: Integrable Solutions Date: Mon, 15 Mar 2004 03:01:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-03/txt/msg00652.txt.bz2 Roger Sayle writes: | On Sun, 14 Mar 2004, Scott Robert Ladd wrote: | > Consider the following program, compiled and run on a Pentium 4 | > (Northwood) system: | > | > #include | | For a number of benchmarks, just this first line of source code above | is enough to loose the race for GCC against Intel when compiling on Linux. | | Consider the following: | | #include | | double doit(double a) | { | return sin(a) * sin(a); | } | | | Compiling with gcc -O2 -ffast-math on Linux generates x86 code that's | significantly slower than Intel's compiler output. However, commenting | out the "#include " corrects the situation and GCC can then | generate *exactly* the same sequence as icc. In summary, in order to get decent codes from GCC on Linux, nobody should be including standard headers supposed to bring appropriate declarations for names used in codes. Oh well. [...] | Just another data point. Avoiding may improve your performance That is a joke ;-) In real world, people have to include standard headers in order to get appropriate declarations. -- Gaby