Java: question about method invokation in for loops
<p>I have a for loop with the following lines: </p>

<pre><code>method1(similarities.instance(i));
method2(similarities.instance(i));
method3(similarities.instance(i));
</code></pre>

<p>If I store into a variable a = similarities.instance(i) and I change the for loop with:</p>

<pre><code>method1(a);
method2(a);
method3(a)
</code></pre>

<p>;</p>

<p>do I get much better performances ? Because I'm not invoking the method at each iteration ? Is it something i should always do ?</p>
