title: Why is initializing gl3w so much faster than initializing GLEW?
body: <p>I'm using GLFW to set the OpenGL context and then test the speed of each library by initializing it multiple times, with all optimization flags on.</p>
  
  <p>On my machine, <strong>gl3w</strong> can be initialized <strong>100</strong> times in about <strong>0.5</strong> seconds:</p>
  
  <pre><code>#include "gl3w.h"
  #include &lt;GLFW/glfw3.h&gt;
  
  int main(void)
  {
      if (!glfwInit()) return 1;
      glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
      glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
      glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
      GLFWwindow *win = glfwCreateWindow(960, 540, "Title", NULL, NULL);
      if (!win) return 2;
      glfwMakeContextCurrent(win);
  
      for (int i = 0; i &lt; 100; ++i) if (gl3wInit()) return 3;
      if (!gl3wIsSupported(3, 3)) return 4;
  
      glfwDestroyWindow(win);
      glfwTerminate();
  
      return 0;
  }
  </code></pre>
  
  <p>While initializing <strong>GLEW</strong> <strong>100</strong> times takes about <strong>2.5</strong> seconds, making it about <strong>5</strong> times slower!</p>
  
  <pre><code>#include &lt;GL/glew.h&gt;
  #include &lt;GLFW/glfw3.h&gt;
  
  int main(void)
  {
      if (!glfwInit()) return 1;
      glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
      glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
      glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
      GLFWwindow *win = glfwCreateWindow(960, 540, "Title", NULL, NULL);
      if (!win) return 2;
      glfwMakeContextCurrent(win);
  
      glewExperimental = GL_TRUE;
      for (int i = 0; i &lt; 100; ++i) if (glewInit()) return 3;
  
      glfwDestroyWindow(win);
      glfwTerminate();
  
      return 0;
  }
  </code></pre>
  
  <p>I am very surprised about this since both of these libraries are designed to fit the same purpose. Could someone explain what the difference is all about?</p>
  
  <p>By the way, omitting the <code>glewExperimental = GL_TRUE;</code> cuts time to <strong>0.3</strong> seconds, but then GLEW isn't initializing correctly because <code>glBindVertexArray(0);</code> just afterwards throws a segmentation fault while it shouldn't.</p>