I have a question about predication and branch prediction.
I've emailed my professor regarding this and he replied me that predication has a less instructions than branch prediction.
So I tried making an example of my on but I'm not sure if this is right..
I've assumed for predication it has 'if' and 'else' each having 100 instructions. Then either right or wrong, it will waste 100 instructions.
For prediction(since this has more instructions), I've assumed it has 'if' and 'else' each having 300 instructions doing exactly the same thing as the predication above.
My questions is..
Is it even possible to make 300 instructions to 100??
In above case, if predication has to win over the benefit of branch prediction, accuracy of prediction should be below 66.6%. (300*0.3333=100) Is this correct?
If so, when deciding which would be better off than which, does it has to be based on accuracy of a prediction or the size? Reason why I am mentioning size is because during the lecture, I remember my professor saying "use predication in small size loops..."
Thanks in advance..