title: Reading integers from a memory mapped formatted file
body: <p>I have memory mapped a large formatted (text) file containing one integer per line like so:</p>
  
  <pre><code>123
  345
  34324
  3232
  ...
  </code></pre>
  
  <p>So, I have a pointer to the memory at the first byte and also a pointer to the memory at the last byte. I am trying to read all those integers into an array as fast as possible. Initially I created a specialized std::streambuf class to work with std::istream to read from that memory but it seem to be relatively slow.</p>
  
  <p>Do you have any suggestion on how to efficiently parse a string like "1231232\r\n123123\r\n123\r\n1231\r\n2387897..." into an array {1231232,123123,1231,231,2387897,...} ?</p>
  
  <p>The number of integers in the file is not known beforehand.</p>