Right now I am using fread() to read a file, but in other language fread() is inefficient i\'v been told. Is this the same in C? If so, how would faster file reading be done
Maybe check out how perl does it. Perl's I/O routines are optimized, and are, I gather, the reason why processing text with a perl filter can be twice as fast as doing the same transformation with sed
.
Obviously perl is pretty complex, and I/O is only one small part of what it does. I've never looked at its source so I couldn't give you any better directions than to point you here.