title: Understanding Getchar unlocked
body: <p>I am kind of a novice in competitive programming and I find that many guys use the following snippet of code in almost every submission that they make.</p>
  
  <pre><code>#define gc getchar_unlocked
  int readint()
  
  {
      int f=0,ret=0;
      char c=gc();
      while(c&lt;'0'||c&gt;'9')
          c=gc();
      while(c&gt;='0'&amp;&amp;c&lt;='9')
      {
          ret=ret*10+c-48;
          c=gc();
      }
      return f?-ret:ret;
  }
  </code></pre>
  
  <p>Does this code ensure fast I/O.What is the logic of using this in competitive programming and other applications?</p>