Charles Mills wrote:
In other words, if one had to venture a *guess* it would be that the
immediate instructions were in practice a heck of a lot faster.

(Don't know that this sort of issue is relevant to the relative versus
branch/displacement comparison.)

<snip>

This is a performance question, right? So "it depends." (Yes, I know you knew that.) And I'm not a performance expert, nor did I stay in a well-known hotel last night. But I'll venture out on this "branch" anyway, to say...

That John hit the nail on the head when he said that processors have gotten a lot faster than memory. To put this into perspective, since the 3168-3 processor came out in the 1970's the cost of a cache-miss real memory access when counted in machine cycles has risen over 400x. (That's not a typo. It's really more than a factor of four hundred.)

That some of our compilers are maximizing the use of immediate and register operands to some extent just for this reason. Although the path length is "theoretically" longer for some of these strings of instructions, they avoid memory accesses often enough that on a practical level they are faster.

That it's time for everyone to be thinking of memory accesses the way we've thought about I/O accesses for half a century. Avoid, buffer, prestage...etc.

And, finally, that the branch instruction itself does not stand alone. One must load a register to use it as a base in order to establish addressability, and load another to use it as a displacement register, and Load instructions can cause real memory (vs. cache) accesses. So, it seems to me there can be some applicability to relative branch as well.

--
John Eells
z/OS Technical Marketing
IBM Poughkeepsie
[email protected]

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

Reply via email to