This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Old compiler optimizations in installed headers
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Richard Henderson <rth at twiddle dot net>
- Cc: Joseph Myers <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Date: Wed, 27 May 2015 17:19:57 +0200
- Subject: Re: Old compiler optimizations in installed headers
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1505221433160 dot 16611 at digraph dot polyomino dot org dot uk> <20150524133125 dot GA19929 at domone> <5565DFA7 dot 4070305 at twiddle dot net>
On Wed, May 27, 2015 at 08:15:51AM -0700, Richard Henderson wrote:
> On 05/24/2015 06:31 AM, OndÅej BÃlka wrote:
> > While good idea in general I would be wary of signbit et al. macros.
> > Using gcc will cause performance regression in some cases as they
> > generate suboptimal branchless code. Adding branches is correct as
> > performance savings from branchless code are in branch misprediction
> > which doesn't happen. If you have more than 5% inputs NaN to offset
> > single cycle penalty of going branchless your problem is that you are
> > producing garbage instead performance.
>
> I beg your pardon? Why would you *ever* have a branch implementing signbit?
>
Sorry, I meant that you must be careful with others like isinf. Not signbit
thats ok.