title: which operation takes more CPU clocks, modulo or comparison?
body: <p>Which operation takes more <code>CPU</code> clocks, <code>modulo</code> or <code>comparison</code>?</p>
  
  <p>Will this code take more time:</p>
  
  <pre><code>for(j = i; j &lt;= 10; j++)
  {
     if(j == 10) printf("0");
     else printf("%d", j);
  }
  </code></pre>
  
  <p>or this </p>
  
  <pre><code>for(j = i; j &lt;= 10; j++)     
     printf("%d", j % 10);
  </code></pre>
  
  <p>and why?</p>