... at least in Java, doing it that way yields awful performance, which is why I'd prefer to use a buffer (read more than one character at a time). I'd like to know what other people have experienced with C--is it similarly inefficient to read one character at a time, and what would be a good buffer size (amount of characters to (try to) read at a time)?
Or will a call to setvbuf (with proper parameters) automatically take care of buffering for me, meaning I get as good performance as can be expected, even when using fgetc? |