From: N8TM AT aol DOT com Message-ID: Date: Thu, 18 Mar 1999 20:42:38 EST To: ssnyder AT indy DOT net, egcs AT cygnus DOT com, pgcc AT delorie DOT com Mime-Version: 1.0 Subject: Re: Questions on inlining of code Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Mailer: AOL 4.0 for Windows 95 sub 238 Reply-To: pgcc AT delorie DOT com 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.