title: How many instructions to access pointer in C?
body: <p>I am trying to figure out how many clock cycles or total instructions it takes to access a pointer in C. I dont think I know how to figure out for example, p->x = d->a + f->b</p>
  
  <p>i would assume two loads per pointer, just guessing that there would be a load for the pointer, and a load for the value. So in this operations, the pointer resolution would be a much larger factor than the actual addition, as far as trying to speed this code up, right?</p>
  
  <p>This may depend on the compiler and architecture implemented, but am I on the right track?</p>
  
  <p>I have seen some code where each value used in say, 3 additions, came from a</p>
  
  <pre><code> f2-&gt;sum = p1-&gt;p2-&gt;p3-&gt;x + p1-&gt;p2-&gt;p3-&gt;a + p1-&gt;p2-&gt;p3-&gt;m
  </code></pre>
  
  <p>type of structure, and I am trying to define how bad this is</p>