title: Remove conditions in a C program for speedup
body: <p>I have a number crunching C program which involves a main loop with two conditionals:</p>
  
  <pre><code>for (i = 0; i &lt; N; i++) {
   for (j = 0; j &lt; N; j++) {
    for (k = 0; k &lt; N; k++) {
      if (k == i || k == j) continue;
      ...(calculate a, b, c, d (depending on k)  
      if (a*a + b*b + c*c &lt; d*d) {break;}
    } //k
   } //j
  } //i
  </code></pre>
  
  <p>The hardware here is the SPE of the Cell processor, where there is a big penalty when using branching. So in order to optimize my program for speedup I need to remove these 2 conditionals, do you know about good strategies for this?</p>