Compiler optimization of references
<p>I often use references to simplify the appearance of code:</p>

<pre><code>vec3f&amp; vertex = _vertices[index];

// Calculate the vertex position
vertex[0] = startx + col * colWidth;
vertex[1] = starty + row * rowWidth;
vertex[2] = 0.0f;
</code></pre>

<p>Will compilers recognize and optimize this so it is essentially the following?</p>

<pre><code>_vertices[index][0] = startx + col * colWidth;
_vertices[index][1] = starty + row * rowWidth;
_vertices[index][2] = 0.0f;
</code></pre>
