se loops are eliminated, but because vectorization allows sharing
subcomputations in the log probability and gradient calculations and
because it reduces the size of the expression tree required for
gradient calculations.</p>
<p>The first optimization vectorizes the for-loop over <code>D</code> as</p>
<pre><code>  mu ~ normal(0, 100);
  for (l in 1:L)
    beta[l] ~ normal(mu, sigma);</code></pre>
<p>The declaration of <code>beta</code> as an array of vectors means that the
expression <code>beta[l]</code> de