Listing 1 Example of a coding style commonly used to achieve performance with early, low-quality C compilers

sun_vaddosb(vect_in1,incr_in1,vect_in2,incr_in2,
             vect_out,incr_out,vect_length)
float *vect_in1, *vect_n2, *vect_out;
int vect_length, incr_in1, incr_in2, incr_out;

{

       register float tmp, tmp_1, tmp_2,
       
       if((incr_in1 == 1) && (incr_in2 == 1) && (incr_out == 1))
       {
              while(vect_length--)
              {
                     tmp_1 = *vect_in1++;
                     tmp_2 = *vect_in2++;
                     tmp   = tmp_1 - tmp_2;
                     
                     *vect_out++ = (tmp_1 + tmp_2) / tmp;
              }
       }
       else
       {
       while(vect_length--)
              {
              tmp_1 = *vect_in1;
              tmp_2 = *vect_in2;
              tmp   = tmp_1 - tmp_2;
              
              *vect_out = (tmp_1 + tmp_2) /tmp;
              
              vect_in1 += incr_in1;
              vect_in2 += incr_in2;
              vect_out += incr_out;
       }
     }
 }

/* End of File */