In computer architecture,
what is difference between (branch) prediction and speculation??
These seems very similar, but i think there is a subtle distinction between them.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Branch prediction is done by the processor to try to determine where the execution will continue after a conditional jump, so that it can read the next instruction(s) from memory.
Speculative execution goes one step further and determines what the result would be from executing the next instruction(s). If the branch prediction was correct, the result is used, otherwise it is discarded.
Note that speculative execution can be applied even if there isn’t an actual conditional branch in the code. The processor can determine the result from several instructions that normally would execute in succession, but the execution could be stopped for example by an arithmetic overflow interrupt.