Mail Archives: pgcc/1999/03/18/20:45:13
In a message dated 3/18/99 7:31:44 AM Pacific Standard Time, ssnyder AT indy DOT 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.
- Raw text -