The more I think about this the more I would recommend MVC:

1. It is unquestionably more clear what the intent is.
2. It is certainly less likely to have unexpected side effects (due to register 
usage).

The above two reasons should be your main considerations. CPU cycles are cheap. 
People are expensive. Bugs are very expensive.

3. We don't know that MVC is any slower than IC/STC, and I can think of two 
reasons that it might be faster (less i-cache, no register contention).

Charles


-----Original Message-----
From: Charles Mills [mailto:[email protected]] 
Sent: Monday, October 16, 2017 8:41 AM
To: 'IBM Mainframe Assembler List'
Subject: RE: One Byte MVC Versus IC/STC

And I suspect "it depends."

Are the operands already in cache? Must the processor do a read-to-write switch 
on a cache line? What instructions came before? What come after? What is the 
preceding and succeeding usage of the register? What is the impact on the 
i-cache of 8 bytes versus 6?

Me, I would tend to write IC/STC assuming I had a register to spare. I have 
what is probably a negatively prejudiced attitude toward MVC.

I certainly agree that MVC is clearer. A maintenance programmer five years from 
now does not have to wonder "is that register really available? Is any 
subsequent routine counting on that value in the register?"

And as Chris implies, unless the code will be doing this millions of times per 
day, who cares? Do whatever floats your boat.

Reply via email to