Yes, STCK guarantees a unique value. If the clock has not ticked since the last 
STCK, the CPU has no choice but to spin until it does. STCKE has smaller 
"ticks" and so has less of (or no) need for a spin. STCKF is just like STCK 
except that it does not guarantee a unique value, and so there is never a need 
to spin, and so it is a "fast" instruction. If all you need is "the time" and 
not a unique timestamp, always use STCKF. It is a one-character change to your 
program and may speed it up considerably.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Paul Gilmartin
Sent: Monday, March 11, 2019 7:38 PM
To: [email protected]
Subject: STCKE faster than STCK! (was: instruction clock speed)

On Wed, 6 Mar 2019 20:18:55 -0800, Charles Mills wrote:

>The 360/40 had one: 7 us for LR, 10 us for L.
>
>It is not possible now. A single instruction may literally add no time at
>all to some instruction sequence.
>
>My imperfect model is that main storage is the new disk. Figure that
>instructions take no time at all and memory accesses take forever.
> 
One exception mentioning at least relative speed I find nowadays is:

IBM ® z/Architecture Principles of Operation SA22-7832-10
Chapter 4. Control
  Timing
    Time-of-Day Clock
      TOD Programmable Register
        Programming Notes:
    ...
12. Due to the sequencing rules for the results of STORE CLOCK and
    STORE CLOCK EXTENDED, the execution of STORE CLOCK may be
    considerably slower than that of STORE CLOCK EXTENDED and STORE
    CLOCK FAST. Depending on the model, the relative slowness of
    STORE CLOCK (as compared with STORE CLOCK EXTENDED and STORE
    CLOCK FAST) is particularly noticeable when multiple STORE
    CLOCK instructions are executed within a short period of time.

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

Reply via email to