This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/31396] Inline code performance much worse than out-of-line



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]