Try this on your hardware and post the results. Uncomment/Comment where applicable.

BENCH    CSECT
BENCH    AMODE 31
         SAVE  (14,12)
         LR    R12,R15
         USING BENCH,R12
         L     R4,=A(1*1000*1000*1000)
         LTR   R4,R4
         J     LOOP
*
LOOP     DS   0D                  .LOOP START
*        B     NEXT               .UNCONDICTIONAL
         BE    NEXT               .CONDITIONAL
NEXT     JCT   R4,LOOP
         LR    R15,0
         RETURN (14,12)
         YREGS ,
         END


On 29/04/2016 9:35 PM, Windt, W.K.F. van der (Fred) wrote:
Here's the code.

I wrote a simple program - it tight loops 1 billion times


           L     R4,=A(1*1000*1000*1000)
           LTR   R4,R4
           J     LOOP
*
LOOP     DS   0D                  .LOOP START
           B     NEXT

NEXT     JCT   R4,LOOP

The loop starts with a branch ... I tested it twice - when the CC is matched
(branch happens) and when it is not matched (falls through)

1. When the CC is matched and branching happens, CPU TIME=2.94 seconds
2. When the CC is not matched the code falls through, CPU TIME=1.69
seconds - a reduction of 42%
Uhm... I don't see any conditional branch at the start of the loop that 
branches or falls through?

Fred!

------------------------------------------------------------------------------------------------------
ATTENTION:
The information in this e-mail is confidential and only meant for the intended 
recipient. If you are not the intended recipient , don't use or disclose it in 
anyway. Please let the sender know and delete the message immediately.
------------------------------------------------------------------------------------------------------


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to