title: Most efficient way to find smallest of 3 numbers Java?
body: <p>I have an algorithm written in Java that I would like to make more efficient. A part that I think could be made more efficient is finding the smallest of 3 numbers. Currently I'm using the <code>Math.min</code> method as below:</p>
  
  <pre><code>double smallest = Math.min(a, Math.min(b, c));
  </code></pre>
  
  <p>How efficient is this? Would it be more efficient to replace with if statements like below:</p>
  
  <pre><code>double smallest;
  if (a &lt;= b &amp;&amp; a &lt;= c) {
      smallest = a;
  } else if (b &lt;= c &amp;&amp; b &lt;= a) {
      smallest = b;
  } else {
      smallest = c;
  }
  </code></pre>
  
  <p>Or if any other way is more efficient</p>
  
  <p>I'm wondering if it is worth changing what I'm currently using?</p>
  
  <p>Any speed increase would be greatly helpful</p>