title: Low speed on converting float stream with pipe, scanf, write
body: <p>I'm trying to save a continuing data stream (very large) to a binary file.
  The data stream is generate with</p>
  
  <pre><code>find . -name "(pattern)" | xargs -L1 awk '{(smth)}' | ./translater
  </code></pre>
  
  <p>The "translator" is a <strong>C</strong> code to revive the data flow from the second pipe.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main() {
      float buffer;
      FILE *stream;
  
      stream = fopen("output.bin", "wb");
      while (scanf("%f", &amp;buffer)==1) {
          fwrite(&amp;buffer, 1, sizeof(float), stream);
      }
      fclose(stream);
      return (0);
  }
  </code></pre>
  
  <p>These combination works well, but takes too long (>3hr) to generate a 2GB binary file. Is there anything that I can improve in order to turbo it?</p>