Is there any overhead with referencing static functions as part of a class definition?
<p>I am currently implementing some utility functions for implementing some libraries I am working on. I was forced to choose between segmenting the functions as static members as part of a class definition within a more general namespace, or enter more specific namespace and then define the functions. I choose the former feeling as it was more flexible in the way those utility classes may be drawn into scope (using or inheritance) though I was unsure whether there was any overhead associated with this design choice or not:</p>

<p>Is</p>

<pre><code>namespace Utilities {
  struct CharUtil {
    static void foo();
  }
}
Utilities::CharUtil::foo();
</code></pre>

<p>slower than</p>

<pre><code>namespace Utilities {
  namespace CharUtil {
    void foo();
  }
}
Utilities::CharUtil::foo();
</code></pre>

<p>?</p>

<p>Is the former faster using inheritance?</p>
