title: What is faster from an performance standpoint of view?
body: <p>Which sequential implementation would be faster from a performance standpoint of view (I do realize that the 2nd one takes more memory and time to write the value in RAM):</p>
  
  <pre><code>for(int j=3; j&lt;=ceil(sqrt(i));j++){
  ...
  }
  </code></pre>
  
  <p>vs </p>
  
  <pre><code>int max=ceil(sqrt(i));
  for(int j=3; j&lt;=max;j++){
  ...
  }
  </code></pre>
  
  <p>It has something to do with how compiler treats this code. Any hints on where to look for the answer are welcome.</p>
  
  <p><strong>P.S.:</strong> Plz do not suggest a bold and straightforward way of checking the performance by just running it. I must remind that the architectures of the underlying systems may vary drastically. So first case may win on one architecture while the second case might dominate on the other. Which is why I need a clearly defined treatment of both. Which would probably be compiler specification, let's restrict the case to gcc. From which point the question would be: which section of compiler specs I'd look in to find it?</p>