Overview
Features
Download
Documentation
Community
Add-Ons & Services

readRaw performance question

Please post support and help requests here.

readRaw performance question

Postby chinistan » 14 Apr 2009, 23:38

Code: Select all
void BinaryReader::readRaw(int length, std::string& value)
{
   value.clear();
   value.reserve(length);
   while (length--)
   {
      char c;
      _istr.read(&c, 1);
      value += c;
   }
}

why read one byte one time, if I want to read 512 bytes block,that means read 512 times. performance may low,right?
chinistan
 
Posts: 10
Joined: 22 Dec 2008, 07:46

Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests