Fastest file reading in C

前端 未结 7 1423
耶瑟儿~
耶瑟儿~ 2020-12-05 00:50

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

相关标签:
7条回答
  • 2020-12-05 01:48

    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.

    0 讨论(0)
提交回复
热议问题