[lkml]   [2007]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Inlining can be _very_bad...
    On Thu, Mar 29, 2007 at 01:18:38AM +0200, J.A. Magallón wrote:
    > Hi all...
    > I post this here as it can be of direct interest for kernel development
    > (as I recall many discussions about inlining yes or no...).
    > Testing other problems, I finally got this this issue: the same short
    > and stupid loop lasted from 3 to 5 times more if it was in main() than
    > if it was in an out-of-line function. The same (bad thing) happens if
    > the function is inlined.
    > It looks like is updating the stack on each iteration...This is -march=opteron
    > code, the -march=pentium4 is similar. Same behaviour with gcc3 and gcc4.
    > tst.c and Makefile attached.
    > Nice, isn't it ? Please, probe where is my fault...

    The only fault is to post this issue here instead of the gcc Bugzilla.

    In your example the compiler should produce code not slower than with
    the out-of-line version when inlining. If it doesn't the bug in the
    compiler resulting in this should be fixed.



    "Is there not promise of rain?" Ling Tan asked suddenly out
    of the darkness. There had been need of rain for many days.
    "Only a promise," Lao Er said.
    Pearl S. Buck - Dragon Seed

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-03-29 19:55    [W:0.040 / U:7.988 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site