I'm looking into file I/O for text files and I've been wondering about functions which read lines from files. Does anyone know if they normally read in every iteration (for each character) or read into a buffer to maybe speed things up?
I'm developing for Windows and I know the OS buffer readings from files (although one can specify not to, with a flag). Because of this I imagine that reading a single character from a file (the cache, really) in every iteration wouldn't be all too bad compared to buffering the file data yourself, right? Has anyone delved into this or perhaps even benchmarked it?