From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12650 invoked by alias); 29 Mar 2007 22:23:07 -0000 Received: (qmail 12470 invoked by uid 48); 29 Mar 2007 22:22:57 -0000 Date: Thu, 29 Mar 2007 22:23:00 -0000 Message-ID: <20070329222257.12469.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/31396] Inline code performance much worse than out-of-line In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jamagallon at ono dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-03/txt/msg02738.txt.bz2 ------- Comment #3 from jamagallon at ono dot com 2007-03-29 23:22 ------- Sample assembler for the loops. For the funcion, out of line: #APP #FBGN #NO_APP movl data, %edx fldz movl $1, %eax .L2: fadds -4(%edx,%eax,4) addl $1, %eax cmpl $268435457, %eax jne .L2 #APP #FEND #NO_APP For the loop in main(): .L11: fldl -56(%ebp) <= look here fadds -4(%edx,%eax,4) fstpl -56(%ebp) <= and here addl $1, %eax cmpl $268435457, %eax jne .L11 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31396