[quagga-dev 8679] Re: trivial quagga patches

Stephen Hemminger shemminger at vyatta.com
Thu Apr 7 17:33:19 BST 2011


On Thu, 7 Apr 2011 17:21:31 +0100 (BST)
paul at jakma.org wrote:

> On Thu, 7 Apr 2011, Stephen Hemminger wrote:
> 
> > Smaller code is faster code,
> 
> But inlining can make the total code size bigger, even where it 
> reduces code size at any specific call site. And runtime branch 
> prediction no longer can know it's the same code.
> 
> > Gcc multi-unit compiling is broken in many versions.
> 
> Ah, interesting. Presumably "in many versions" means that it's now 
> fixed? There's also link-time optimisation.
> 
> Point remains: these optimisations need to be done based on objective 
> measurements (by human, or through profile-directed compiler 
> optimisation).

My statement is based on measurements, not speculation.

Original code:
   text	   data	    bss	    dec	    hex	filename
 654901	  85536	    888	 741325	  b4fcd	bgpd

After inlining flag and lock
   text	   data	    bss	    dec	    hex	filename
 654381	  85536	    888	 740805	  b4dc5	bgpd

Code is smaller by 520 bytes.



More information about the Quagga-dev mailing list