This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: mainline more jumpy than gcc-2.95.1 on x86
- To: dewar at gnat dot com
- Subject: Re: mainline more jumpy than gcc-2.95.1 on x86
- From: cucu <dann at ics dot uci dot edu>
- Date: Wed, 14 Mar 2001 16:26:31 -0800
- Cc: gcc at gcc dot gnu dot org
- References: <20010314130730.69212F289E@nile.gnat.com>
dewar@gnat.com writes:
> <<I don't know if this is a problem in more complex code, but somebody
> might want to investigate (given that the common wisdom is that
> branches are bad)... >>
>
>
> That's not quite the right common wisdom, the deal is that mispredicted
> branches are bad, but in this particular case, the branches are indeed
> likely to be mispredicted.
Correctly predicted taken branches are not too good either, for
example in a 4-issue machine, if the first instruction is a taken
branch, the 3 that are left should be scratched (assuming no delay
slots).
On the other hand these unneeded branches occupy entries in the branch
predictor => decreased prediction accuracy.