Questions on inlining of code
N8TM@aol.com
N8TM@aol.com
Wed Mar 31 23:46:00 GMT 1999
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.
More information about the Gcc
mailing list