title: Is performance of "Math.abs()" better than expression with "if"?
body: <p>I have expression:</p>
  
  <pre><code>Double getAbs(Double value){
  return value&gt; 0 ? value: value== 0 ? null : -value;
  }
  </code></pre>
  
  <p>or better:</p>
  
  <pre><code> Double getAbs(Double value){
  return Math.abs(value);
  }
  </code></pre>
  
  <p>I understand that there are some differences about NaN. But method Math.abs(double) - so we have unboxing.
  In which case performance better?</p>