Re: Branch Prediction - Thy New Enemy?
- From: "Tom St Denis" <tomstdenis@xxxxxxxxx>
- Date: 26 Aug 2006 05:27:06 -0700
xmath wrote:
BTW, this is also perhaps a good moment to mention something I find out
when looking through some of gcc's output: on PowerPC, at least the
gcc I got here produces branching code-sequences for x > 0 and x <= 0
for signed x, when using the result numerically. Same for the
equivalent x >= 1 and x < 1. It seems it produces branch-free
sequences for all other comparisons of word-size arguments, signed or
unsigned, constant or variable.
gcc version 4.0.0 (Apple Computer, Inc. build 5026)
Part of my job involves hacking large code like DB2 and I've seen GCC
4.1.0 use the CMOV* series of opcodes [whereas ICC v9 doesn't hahahaha]
to avoid branches.
Like I've always said, GCC is smart, it knows things.
:-)
Tom
.
- References:
- Branch Prediction - Thy New Enemy?
- From: Tom St Denis
- Re: Branch Prediction - Thy New Enemy?
- From: xmath
- Re: Branch Prediction - Thy New Enemy?
- From: David Wagner
- Re: Branch Prediction - Thy New Enemy?
- From: xmath
- Re: Branch Prediction - Thy New Enemy?
- From: David Wagner
- Re: Branch Prediction - Thy New Enemy?
- From: xmath
- Branch Prediction - Thy New Enemy?
- Prev by Date: Re: Branch Prediction - Thy New Enemy?
- Next by Date: Re: Cross platform password string encryption
- Previous by thread: Re: Branch Prediction - Thy New Enemy?
- Next by thread: Re: Branch Prediction - Thy New Enemy?
- Index(es):
Relevant Pages
|