title: C++: Structs slower to access than basic variables?
body: <p>I found some code that had "optimization" like this:</p>
  
  <pre><code>void somefunc(SomeStruct param){
      float x = param.x; // param.x and x are both floats. supposedly this makes it faster access
      float y = param.y;
      float z = param.z;
  }
  </code></pre>
  
  <p>And the comments said that it will make the variable access faster, but i've always thought structs element access is as fast as if it wasnt struct after all.</p>
  
  <p>Could someone clear my head off this?</p>