Sweet. This would have saved me hours of sleeplessness--or at least fitful sleep--in the ensuing decades. ;-) If the business ever turned out to be so successful as to exceed two billion records of any type, this report would have been a joy to (re)write yet again.
. . . J.O.Skip Robinson Southern California Edison Company Electric Dragon Team Paddler SHARE MVS Program Co-Manager 323-715-0595 Mobile [email protected] [email protected] > -----Original Message----- > From: IBM Mainframe Discussion List [mailto:[email protected]] > On Behalf Of Tony Harminc > Sent: Sunday, December 27, 2015 12:14 PM > To: [email protected] > Subject: [Bulk] Re: Is there a source for detailed, instruction-level > performance > info? > > On 27 December 2015 at 14:47, Skip Robinson <[email protected]> > wrote: > > As a newbie, I got curious about the relative speed of these strategies: > > > > 1. L R15, COUNTER > > 2. A R15,=F(+1) > > 3. ST R15, COUNTER > > > > 1. L R15, COUNTER > > 2. LA R15,1(,R15) > > 3. ST R15, COUNTER > > > > I asked my manager, who encouraged me to delve into the manual Shmuel > cites. > > I decided that LA was faster because there was no storage access. The > > program ran like a banshee. It ran so fast that it was used to > > benchmark new hardware. Really! > > > > It wasn't till later that I pondered a basic flaw. As written, the > > program could not handle a counter greater than 16M because it ran in 24 bit > mode. > > There's a third model for this very common operation: > > LA R15,1 > A R15,COUNTER > ST R15,COUNTER > > This handles the full 31-bit range and maintains the advantage of the LA not > referencing storage, but brings the ST closer in time/cycles/etc. to the A, > which > could conceivably make it wait for the result of the A, whereas the LA could > perhaps have its result ready faster. > > Nonetheless it in some sense looks "wrong", I suppose because we are thinking > of COUNTER as needing to have something added to it, and not > 1 as needing to have something added to *it*, however much we know addition > to be commutative. > > > Moral: whether or not size matters, speed is certainly not a simple metric. > > Indeed. > > Tony H. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
