Aspects


vs


Fgetc

Anything related to C or C++ standard library functions `fgetc` (C) or `std::fgetc` (C++)

Fread

A binary-safe file read function in C/C++/PHP that returns the specified number of bytes from a stream

Others

Quality Example
Much slower

"Doing things like 1000 successive fgetc is much slower than doing one single fread of 1000 bytes"

from question "Improve fgetc performance"

Version simpler

"You might have even noticed the fgetc version is simpler than the fread version"

from question "Why is reading blocks of data faster than reading byte by byte in file I/O"

Slower

"The fgetc loop variant was consistently 45x slower than the fread loop"

from question ""Optimal" IO Buffering - Programmer's or Kernel's Task?"

Back to Home
Data comes from Stack Exchange with CC-BY-SA-3.0