title: Static Using Performance Penalty?
body: <p>I was curious if there was any <strong>runtime</strong> performance penalty between importing a static class with a <code>using</code> vs importing the "typical" way and invoking methods explicitly with a receiver, specifically when it comes to a rather large class.</p>
  
  <p>For example, my current project uses OpenGL, where each OpenGL function is bound to a static method in the <code>Gl</code> class. I have chose to keep the naming convention within this class the same as its native counterpart (i.e. <code>glClear</code> is <code>Gl.glClear</code>).</p>
  
  <p>I then use the class like this:</p>
  
  <pre class="lang-cs prettyprint-override"><code>using static OpenGL.Gl;
  
  void SomeFunction()
  {
      glClear();
      // etc, etc
  }
  </code></pre>
  
  <p>...as opposed to this...</p>
  
  <pre class="lang-cs prettyprint-override"><code>using OpenGL;
  
  void SomeFunction()
  {
      Gl.glClear();
      // etc, etc
  }
  </code></pre>
  
  <p>Naming convention aside, is there any runtime penalty importing so many symbols into the current context in this situation (being the <code>Gl</code> class has hundreds of static methods and public constants)? </p>
  
  <p>I am not really concerned with build-time or the extra workload on the IDE to provide intellisense, only with the final result after compilation. </p>
  
  <p>My feeling is that it is simply syntactic sugar and results in the same IL code, but I am not very well versed on reading IL to confidently determine this.  </p>