read() vs fread()

2009-02-20 Thread Junsuk Shin
Hi BSD guys, While I was doing simple file read test, I found that there is a huge difference in file read performance between read() and fread(). I'm wondering if I'm doing something wrong or if someone has experienced similar things. Here is what I did, For the specific application, I need to

Re: read() vs fread()

2009-02-20 Thread Pieter de Goeje
On Friday 20 February 2009 21:07:57 Junsuk Shin wrote: Hi BSD guys, While I was doing simple file read test, I found that there is a huge difference in file read performance between read() and fread(). I'm wondering if I'm doing something wrong or if someone has experienced similar things.

Re: read() vs fread()

2009-02-20 Thread Junsuk Shin
setvbuf(file, buf, _IOFBF, bufsize) solved the problem perfectly. Thanks a lot. On Fri, Feb 20, 2009 at 4:09 PM, Pieter de Goeje pie...@degoeje.nl wrote: On Friday 20 February 2009 21:07:57 Junsuk Shin wrote: Hi BSD guys, While I was doing simple file read test, I found that there is a