3

While it seems that, in theory, std::istream::get() could be fast, in fact it isn't. I believe that one reason is that some locking is done for every call to std::istream::get(), and that for single-threaded programs this isn't needed. Is there an equivalent to getc_unlocked in C++? Or perhaps some method of turning off this locking for (I presume) a std::streambuf, in C++?

Zaffy
  • 16,801
  • 8
  • 50
  • 77
BenRI
  • 724
  • 6
  • 17

0 Answers0