And according to Dr John, BCT/BCTG, BXLE/BXLEG are predicted to always branch.
Ciao, -------------------------------------------------- Raphael Dal-Pos / z/OS Support Generali France Assurances DSIO - DIO - IT Infrastructure & Support Saint Denis - Wilo W 03 B1 028 F [email protected] +(33)1-58-38-59-67 or mobile +(33)6.24.33.20.87 -------------------------------------------------- "MVS: Guilty, until proven innocent !!" RDP 2009 -----Message d'origine----- De : IBM Mainframe Assembler List [mailto:[email protected]] De la part de Peter Relson Envoyé : vendredi 19 avril 2013 14:39 À : [email protected] Objet : Re: Good Performing Code (Was: Millicode Instructions) >I would assume that 1 branch (the first option) is always faster than >2 branches (the second option). The branch prediction in the CPU >should figure out with execution path is most likely. That is not a correct assumption, even if the branch prediction "table" of the CPU was long enough to remember every branch ever taken for the life of the power-on. You would need to know if this code is even executed enough to stay in any sort of table (let alone in cache). I'm not saying which is faster, just that the assumption is incorrect. In this land of pipelines and out of order execution (mixed with operating system dispatches and redispatches), hard and fast rules are hard to come by. What is knowable is that the general approach of the machine is to look ahead and to prefer that conditional branches not be taken. And when looking ahead, it knows that an unconditional branch will be taken so it can continue forward. So maybe it will be able to look further forward in the fall-through case. Peter Relson z/OS Core Technology Design
