This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: Patch to define __NO_STRING_INLINES in system.h


> "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:
> 
> >  > While I am entirely in favor of this patch, I do have to point out
> >  > that making just this change causes a slight, consistent increase in
> >  > the text size of all the compiler binaries.  (i686-linux native build)
> >  > 
> >  >                     before    after   delta
> >  > cc1                3775717  3777259    1542
> >  > 
> >  > Appended to this message is a diff of the dissassembly of alias.o.
> >  > It looks like difficulty optimizing memset, but I could be wrong.
> >  > zw
> >
> > Thanks very much for the analysis.  Chalk one up for glibc I
> > guess. :-/
> >
> > I conclude two things, first there doesn't appear to be enough of a
> > difference to warrant rejecting the patch.  (Do you agree?)
> 
> Yes.  1.5k is trivial - I've got a patch under development to knock
> the text size down by ~200k.  And that's an easy one; there's more
> gains to be had in the same places.
> 
> > Second, this should be fuel for someone to look at why we don't do
> > quite as well as glibc.  I think Jan's done some work in that area,
> > perhaps he could take a look?  (I'm certainly not qualified.)
> 
> Agree this is worth looking into.  

I will try to take a look.  One of major differences between glibc and
gcc builtin expansion is the fact that GCC aligns the operands.  This is
important performance win when operands are missaligned that is common
case in graphics program, not so for GCC.
The code is larger too.  We do have -m switch to disable the alignments.

Honza
> 
> zw


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