From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14483 invoked by alias); 15 Mar 2004 04:06:44 -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 14476 invoked from network); 15 Mar 2004 04:06:44 -0000 Received: from unknown (HELO ams004.ftl.affinity.com) (216.219.253.138) by sources.redhat.com with SMTP; 15 Mar 2004 04:06:44 -0000 Received: from coyotegulch.com ([4.4.125.218]) by ams.ftl.affinity.com with ESMTP id <325475-14612>; Sun, 14 Mar 2004 23:03:53 -0500 Message-ID: <40552B24.3060503@coyotegulch.com> Date: Mon, 15 Mar 2004 04:06:00 -0000 From: Scott Robert Ladd User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040310 Debian/1.6-2 MIME-Version: 1.0 To: Gabriel Dos Reis CC: Roger Sayle , gcc@gcc.gnu.org Subject: Re: GCC viciously beaten by ICC in trig test! References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00656.txt.bz2 Gabriel Dos Reis wrote: > 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. And the other solution -- using -D__NO_INLINE__ -- is counterintuitive (though effective on my "doit" example, according to a quick test I just ran.) Why would someone seeking to generate fast code use a definition that disables inline functions? It appears that two generalized, portable solutions (glibc and gcc) cancel each other out, resulting in poor code generation. Perhaps GCC can be modified to automatically use the -D__NO_INLINE__ switch on glibc platforms -- although using that switch may not always be wise. I compiled one of my "big" applications with -D__NO_INLINE__, and it's run-time was reduced substantially -- to ZERO. I'm too tired tonight to figure out why; I'll look into it tomorrow. > In real world, people have to include standard headers in order to get > appropriate declarations. Exactly. The provided solution isn't really a solution, given that portable code is going to use ANSI standard headers by definition. -- Scott Robert Ladd Coyote Gulch Productions (http://www.coyotegulch.com) Software Invention for High-Performance Computing