Am 29.04.2016 um 18:59 schrieb Jim Mulder:
No. It's the opposite which is why I originally posted. The
unconditional branch is slower and I want to know why.
The relevant comparison is not conditional branch vs.
unconditional branch. It is branch not taken vs. branch taken.
Sequential execution is always best. Branch prediction tries to
mitigate some of the effects of nonsequential execution.
Jim Mulder z/OS System Test IBM Corp. Poughkeepsie, NY
IMO, the interesting point about this (for ASSEMBLER programmers and
legacy code) is:
there are IBM and home grown macros which put their parameter lists
inline and branch around them, although there are other possibilities
(separating parameters from the execution path using MF=L, MF=E or
register notation etc.). Such macros should be avoided in tight loops.
An example which occured to me was a LOOP macro of a SP macro package,
where the loop control variable was a packed decimal variable defined in
the
instruction stream and branched over. This is even worse, I believe,
because the
I-cache is invalidated by stores into (or computations using) the loop
control variable.
I changed this, when I made the whole package sensitive to a global
variable that signalled
"no base register present" (AKA baseless); then the variable is put in a
well-known
DSECT for auto variables, which is defined in the module's startup macro.
Kind regards
Bernd
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN