Examples for Estimating Abstract Code Units

The number of ACUs that constitute a function is proportional to the size and complexity of the function. Because the compiler calculates ACUs based on internal algorithms, you can only estimate the number of ACUs for a given function. Here are two examples on which you can base your estimates.

Example of a 33-ACU Function

   int florence(char a, int b)
   {
      if(a != 10)
         b++;
      else
         b += 10;
      return(a);
   }

Example of 51-ACU Function

   int sanjay(long par1, long par2)
   {
      while(par1)
      {
         if(par2)
            test3();
         par1--;
      }
      if(par1)
         testing();
      par1 += par2;
   }


Inlining


Benefits and Drawbacks of Inlining