title: Does the order of class members affect access speed?
body: <p>I'm writing a delegate library that is supposed to have absolutely no overhead. Therefore it's important that the access of a function pointer is done as fast as possible.</p>
  
  <p>So my question is: Does the access speed depend on the member position in a class? I heard that the most important member should be the first in the member declaration, and that make sense to me, because that means that the <code>this</code> pointer of a class points to the same address as the important member (assuming non-virtual classes). Whereas if the important member would be at any other position, the CPU would have to calculate it's position by adding <code>this</code> and the offset in class layout.</p>
  
  <p>On the other hand I know that the compiler represents that address as a <code>qword-ptr</code>, which contains the information of the offset.</p>
  
  <p>So my question comes down to: Does resolving a <code>qword-ptr</code> take a constant time or does it increase if the offset is not <code>0</code>? Does the behaviour stay the same on different plattforms?</p>