title: Why looping over array using array indexing is slower than that of pointer access?
body: <p>I'm reading Kochan's book "Programming in C". In section Pointer and Arrays on p. 264 he says:</p>
  
  <blockquote>
    <p>In general, the process of indexing an array takes more time to execute than does
    the process of accessing the contents of a pointer. In fact, this is one of the main reasons
    why pointers are used to access the elements of an array—the code that is generated is
    generally more efficient. Of course, if access to the array is not generally sequential,
    pointers accomplish nothing, as far as this issue is concerned, because the expression
    *(pointer + j) takes just as long to execute as does the expression array[j].</p>
  </blockquote>
  
  <p>Can someone explain what is faster than what ? Specifically, if speed of array[j] = speed of *(pointer + j) then what is <em>the process of indexing an array</em> and what is <em>the process of accessing the contents of a pointer</em> ? Also, there are questions and answers on SO that mention that array[j] is converted to *(array+j) during compilation so there shouldn't be any difference.</p>
  
  <p>Summary:
  Please give me a very simple example of what Kochan says. 2 pieces of code and point at faster one, don't have to explain why it is true.</p>