How much overhead should I expect from a wrapper function
<p>This question is more or less similar to this <a href="http://stackoverflow.com/questions/940877/extend-an-existing-api-use-default-argument-or-wrapper-function">Extend an existing API: Use default argument or wrapper function?</a>
but sufficiently different.<br> Please read.</p>

<p>I have a class Foo that has function oldFunc that is used in many parts of my program.<br>
In order to introduce new behaviour to Foo I implemented newFunc and made it private so that<br>
callers to oldFunc keep using the same API but can get the new behaviour if they set a flag by
calling setUseType() function.<br></p>

<p>Pseudo code follows:<br></p>

<pre><code>class Foo
{
public:
  Foo(){ useNew = false;}
  void setUseType(bool useType){ useNew = useType;}
  std::string oldFunc(int r) 
  {
     if(useNew )
    {
      return newFunc(r);
    }
    return std::string("Some value after doing some work");
  }
 private:
   std::string newFunc(int r){ return std::string("Some value after doing some work");}
   bool useNew;
};
</code></pre>

<p><strong>Question</strong> <code>oldFunc</code> is called many times ( millions of times) inside a loop.<br>
How much overhead should I expect from wrapping <code>newFunc</code> inside <code>oldFunc</code>.
Theoretically if <code>oldFunc</code> and <code>newFunc</code> where indentical in implementation is there a reason to expect
calls with a flag set<code>UseType(true)</code> to be slower?</p>
