This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/31396] Inline code performance much worse than out-of-line
- From: "jamagallon at ono dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Mar 2007 22:22:57 -0000
- Subject: [Bug c/31396] Inline code performance much worse than out-of-line
- References: <bug-31396-14334@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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