Most efficient way of accessing coordinates
<p>Given the following definition</p>

<pre><code>union {
  double coords[3];
  struct {
    double x,y,z;
  };
} p;
</code></pre>

<p>it is possible to access the coordinates of a 3D point both by index and by name (both ways have their advantages). But are they equivalent? More precisely: will the following expressions</p>

<pre><code>... p.coords[0] ... p.x ...
... p.coords[1] ... p.y ...
... p.coords[2] ... p.z ...
</code></pre>

<p>(pairwise, for each line) generate the same (assembly) code? Is there a difference in efficiency between the two ways of accessing a coordinate?</p>
