title: Does accessing via a shared_ptr pollute the cache line more than raw pointer?
body: <p>I understand a good compiler can perform optimization so that accessing, say an <code>int*</code> via a <code>std::shared_ptr</code> is done using the same assembly as if a raw <code>int*</code> pointer was used. </p>
  
  <p>My question is: would the cache line containing the optimized smart pointer be polluted with other data members from the smart pointer, like the reference counter? So that although the assembly generated would be identical with a real pointer, the cache performance could be worse because not as much of the cache line is being used efficiently?</p>
  
  <p>EDIT: This performance effect could be more-noticeable if we were iterating through a structure like <code>std::vector&lt;std::shared_ptr&lt;int&gt;&gt;</code> and using the ints.</p>