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: [rtlopt] speed improvement of branch prediction


> > > > this is a corrected patch which speeds up branch prediction by using
> > > > sreal.c (simple real library) instead of real.c
> > >
> > > Speed up real.c instead.
> 
> Speed up the use of real.c instead.  See attached patch.
> It gets rid of most divisions in branch prediction.
> 
> > real.c already does not do operations bit by bit
> > but by groups of bits (size of unsigned long)
> > so I do not know how to speed it up.
> 
> It does do division bit by bit.  Speeding up real.c isn't worth it
> imho; there are bigger fish to fry, and it would be quite hard to
> significantly speed up real.c while keeping it correct.
> 
> This patch achieves a speedup of GCC by a few percent on compiling
> combine.c; any suggestions for better compile-time benchmarks gladly
> accepted.

I have compared the speed. Segher Boessenkool's code runs faster than
the original, but sreal-version runs even faster.
(I do not remember the exact times (I have measured it yesterday)
but the speed of pranch predictions the ratio
old:yours:old-sreal was approximatelly 10:7:3 or mayb even better for
sreal (I have measured some time ago more than 4 times speed improvement))

Some of your speed improvements can be used with sreal too.

I think Segher Boessenkool's patch is good for 3_3-branch and mainline,
we should ask some maintainer to approve it.

Josef


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