res-with-componentwise-assignment">Scope of compound structures with componentwise assignment</h4>
<p>In the case of local variables for compound structures, such as arrays, vectors, or matrices, if they are built up component by component rather than in large chunks, it can be more efficient to declare a local variable for the structure outside of the block in which it is used. This allows it to be allocated once and then reused.</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode stan code-with-co