This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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] PowerPC: removed branch prediction from rint implementation


On Sun, Mar 31, 2013 at 8:02 PM, Adhemerval Zanella
<azanella@linux.vnet.ibm.com> wrote:
> This patch removes the branch prediction instructions for PowerPC rint
> implementation, replacing them for normal instructions. These instructions
> are actually hurting performance, it is safer and generally better to let
> the hardware handle it.

This is true on Power7.  I believe it was not the case on older hardware.

> I added a rint benchmark test on benchtest framework. The results on a POWER7
> 64 bits are:
>
> MASTER: rint: ITERS:1e+09: TOTAL:12.0901s, MAX:48.908ns, MIN:5.312ns, 8.27124e+07 iter/s
> PATCH:  rint: ITERS:1e+09: TOTAL:5.29302s, MAX:37.826ns, MIN:3.922ns, 1.88928e+08 iter/s
>
> Any tips, comments, advices?

We could conditionally exclude the branch hints on power7 and later
hardware as an alternative.

Steve?

Ryan


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