Fast output to ascii file

Hi Tuan,

Calling flush will slow things down since this forces a write to the disk and disk I/O is the slow part. Instead, you want to use a larger system I/O buffer. I happen to be in the process of writing an example of using setvbuf for another users (See: I/O buffering behavior (2nd attempt)) which may help you as well.

Note that if the output does not need to be formatted, then it would be faster to output in binary.

  • Mat