This is the mail archive of the gcc@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]

Re: Questions on inlining of code


In a message dated 3/18/99 7:31:44 AM Pacific Standard Time, ssnyder@indy.net
writes:

> 2. Does aggressive inlining of code make any sense on a Pentium+ CPU?
>  It obviously helps on a 386/486 by avoiding the call/return instructions. 
>  I wonder, though, if the inlining of code doesn't just thrash the L2 cache 
>  on more recent processors.  Given the prevalence these days of 512kb L2

I suspect your context is different from mine, but I would answer that in-
lining is likely to be useful only in inner loops.  I would point out also
that there is little benefit in going beyond -Os with the "stable release"
compilers, and seldom more than 10% with the snapshots.  Depending on your
source code, you may be able to exert some control over excessive in-lining by
splitting it into separately compiled files, using includes as necessary.


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