title: Read a line of input faster than fgets?
body: <p>I'm writing a program where performance is quite important, but not critical. Currently I am reading in text from a <code>FILE*</code> line by line and I use <code>fgets</code> to obtain each line. After using some performance tools, I've found that 20% to 30% of the time my application is running, it is inside <code>fgets</code>.</p>
  
  <p>Are there faster ways to get a line of text? My application is single-threaded with no intentions to use multiple threads. Input could be from stdin or from a file. Thanks in advance.</p>