Re: branch guessing, Microarchitectural support for counting

Liste des GroupesRevenir à c arch 
Sujet : Re: branch guessing, Microarchitectural support for counting
De : johnl (at) *nospam* taugh.com (John Levine)
Groupes : comp.arch
Date : 26. Dec 2024, 20:11:01
Autres entêtes
Organisation : Taughannock Networks
Message-ID : <vkk9o5$25bs$1@gal.iecc.com>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
According to Michael S  <already5chosen@yahoo.com>:
Yes, compilers often generate such code.
When coding in asm, I typically know at least something about
probability of branches, so I tend to code it differently:

The first version of FORTRAN had a FREQUENCY statement which let you tell it the
relative likelihood of each of the results of a three-way IF, and the expected number of
iterations of a DO loop.  It turned out to be useless, because programmers usually
guessed wrong.

The final straw was a compiler where they realized FREQUENCY was implemented
backward and nobody noticed.

Unless you've profiled the code and you data to support your branch guesses,
just write it in the clearest way you can.

--
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

Date Sujet#  Auteur
3 Oct 24 * Microarchitectural support for counting33Anton Ertl
3 Oct 24 +* Re: Microarchitectural support for counting28Brett
5 Oct 24 i`* Re: Microarchitectural support for counting27MitchAlsup1
5 Oct 24 i +- Re: Microarchitectural support for counting1Brett
5 Oct 24 i +* Interrupts in OoO (was: Microarchitectural support for counting)7Anton Ertl
7 Oct 24 i i+* Re: Interrupts in OoO (was: Microarchitectural support for counting)4Brett
7 Oct 24 i ii+* Re: Interrupts in OoO2MitchAlsup1
8 Oct 24 i iii`- Re: Interrupts in OoO1MitchAlsup1
8 Oct 24 i ii`- Re: Interrupts in OoO1Terje Mathisen
7 Oct 24 i i+- Re: Interrupts in OoO1MitchAlsup1
13 Oct 24 i i`- Re: Interrupts in OoO1Anton Ertl
5 Oct 24 i +* Re: Microarchitectural support for counting2MitchAlsup1
25 Dec 24 i i`- Re: Microarchitectural support for counting1MitchAlsup1
25 Dec 24 i +* Re: Microarchitectural support for counting8Paul A. Clayton
25 Dec 24 i i`* Re: Microarchitectural support for counting7MitchAlsup1
25 Dec 24 i i +- Re: Microarchitectural support for counting1MitchAlsup1
31 Dec 24 i i `* Re: Microarchitectural support for counting5Paul A. Clayton
1 Jan 25 i i  `* Re: Microarchitectural support for counting4MitchAlsup1
2 Jan 25 i i   +- Re: Microarchitectural support for counting1MitchAlsup1
6 Jan 25 i i   `* Re: Microarchitectural support for counting2Paul A. Clayton
7 Jan 25 i i    `- Re: Microarchitectural support for counting1Terje Mathisen
25 Dec 24 i `* Re: Microarchitectural support for counting8MitchAlsup1
26 Dec 24 i  +* Dealing with mispredictions (was: Microarchitectural support ...)2Anton Ertl
26 Dec 24 i  i`- Re: Dealing with mispredictions1MitchAlsup1
26 Dec 24 i  `* Re: Microarchitectural support for counting5Michael S
26 Dec 24 i   `* Re: branch guessing, Microarchitectural support for counting4John Levine
26 Dec 24 i    +- Re: branch guessing, Microarchitectural support for counting1Michael S
26 Dec 24 i    +- Re: branch guessing, Microarchitectural support for counting1MitchAlsup1
26 Dec 24 i    `- Re: branch guessing, Microarchitectural support for counting1Thomas Koenig
26 Dec 24 +* Re: Microarchitectural support for counting2Chris M. Thomasson
26 Dec 24 i`- Re: Microarchitectural support for counting1Anton Ertl
27 Dec 24 `* Re: Microarchitectural support for counting2jseigh
28 Dec 24  `- Re: Microarchitectural support for counting1jseigh

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal