I think this is one of the sections of code that Phillipe was referring to. He 
adjusts the lo-ord bit value in R14, bit by bit up to 7 times instead of 
performing an IC from a table as I used.  He found that the tight BCT loop was 
more efficient than the IC with the storage reference in this situation, and 
apparently tested with data that did not favor either approach.  

         LLILF 14,X'00000080'
         LTR   15,15
         JZ    &TBTIX.R
&TBTIX.L DS    0H
         SRL   14,1
         BCT   15,&TBTIX.L
&TBTIX.R DS    0H
         EX    14,&TBTIX.X
         B     &TBTIX.F
&TBTIX.X OI    0(1),0

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of Charles Mills
Sent: Thursday, May 20, 2021 5:08 PM
To: [email protected]
Subject: Re: RES: Macro to set a bit string

Caution! This message was sent from outside your organization.

Why would you use a loop on SRL 1 rather than an SRL 0(15)?

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]]
On Behalf Of Mike Hochee
Sent: Thursday, May 20, 2021 1:48 PM
To: [email protected]
Subject: Re: RES: Macro to set a bit string

Interesting. Thank you Philippe! I can see how the loop might be faster despite 
the storage reference.

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]]
On Behalf Of Philippe Leite
Sent: Thursday, May 20, 2021 4:43 PM
To: [email protected]
Subject: Re: RES: Macro to set a bit string

Caution! This message was sent from outside your organization.

Hi João,

I'm glad you liked the macro.
In my implementation I use shift in a loop before execute.
This is much faster than memory access through IC instruction.
Even in the worst case when it shifts seven times it's faster than IC.
That's why I didn't use it. You can test in a loop to be certain.


Best regards,

Philippe Leite
z/OS System Programmer

Reply via email to