title: How to determine CPE: Cycles Per Element
body: <p>How do I determine the CPE of a program?
  For example, I have this assembly code for a loop:</p>
  
  <pre><code># inner4: data_t = float
  # udata in %rbx, vdata in %rax, limit in %rcx,
  # i in %rdx, sum in %xmm1
  1 .L87:                                   # loop:
  2   movss  (%rbx,%rdx,4), %xmm0           #  Get udata[i]
  3   mulss  (%rax,%rdx,4), %xmm0           #  Multiply by vdata[i]
  4   addss  %xmm0, %xmm1                   #  Add to sum
  5   addq  $1, %rdx                        #  Increment i
  6   cmpq  %rcx, %rdx                      #  Compare i:limit
  7   jl .L87                               #  If &lt;, goto loop
  </code></pre>
  
  <p>I have to find the lower bound of the CPE determined by the critical path using the data type float. I believe that the critical path would refer to the slowest possible path, and would thus be the one where the program has to execute the mulss instruction because that takes up the longest number of clock cycles.</p>
  
  <p>However, there doesn't seem to be any clear way to determine the CPE. If one instruction takes two clock cycles, and another takes one, can the latter start after the first clock cycle of the former? Any help would be appreciated. Thanks</p>