Profile-Guided Optimizations

By Gary Carleton, Knud Kirkegaard, and David Sehr

Dr. Dobb's Journal May 1998

void A (...) {
      InlinedProc (...);
 ...
}
void InlinedProc (...) {
      if (condition)
          // Code that is frequently executed when called by A
      else
          // Code frequently executed when called by others
}

Example 1: A case where inlining before profiling is advantageous.

Back to Article


Copyright © 1998, Dr. Dobb's Journal