Skip to content

Reading files superfast

Akshay Dixit edited this page Apr 3, 2015 · 1 revision

##Introduction There are various variations and tricks with iterators that people use to read files using the C or C++ API. In snametize a lot of time( well practically almost all) is spent in doing I/O. As a result, we should be blazingly fast with our reads and writes. Thus, we perform a set of experiments to determine which method of reading files will be fastest.

##Methods

  1. Simple C API
  2. Simple C++ API
  3. Using std::istreambuf_iterator
  4. Using std::istreambuf_iterator with std::string.reserve and std::string.assign
  5. Using std::stringstream
  6. Using boost::iostreams::mapped_file
Clone this wiki locally