Original Post
for(int i=0;i<1000000000000;i++) if(i<90) kick A; else kick B; as you see, [kick B]happens most of the time; so if the branch prediction fall in predict taken, this kind of if-else is not effective; and on my pc: (intel p4,winxp), the form: if(i>90) Kick B; else Kick A; run %2 faster; so my question is: 1, does my test of if-else really tell me that I should put the thing that happens more often under the taken zone; can how the compiler and architecture work at this point be test simply in this way? 2, on pc(intel,AMD),xbox,ps3, what's the situation; thanks for advance!