First time here? Checkout the FAQ!
x
menu search
brightness_auto
more_vert
What's the difference between delayed branch and branch prediction?
thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike
more_vert

Please answer this question

1 Answer

more_vert
 
verified
Best answer
Delayed branch Branch prediction
Delayed branch simply means that some number of instructions that appear after the branch in the instruction stream will be executed regardless of which way the branch ultimately goes Branch prediction is a more hardware-oriented approach, in which the instruction fetcher simply "guesses" which way the branch will go, executes instructions down that path, and if it later turns out to have guessed wrong, the results of those instructions are thrown away
In many cases, a compiler can put instructions in those slots that don't actually depend on the branch itself, but if it can't, it must fill them with NOPs, which kills the performance anyway. the compiler puts a clue into the instruction stream, and sometimes the hardware keeps track of which way each branch has gone in the past.
This approach keeps the hardware simple, but puts a burden on the compiler technology. This approach is bit complicated
Same accuracy Various systems have different ways of improving the accuracy of the guess

 

 

thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike
more_vert

Thank you for answering ! Please register in order to get credits for your content

...