<p>Unfortunately, looks like we better try to optimized the speed of CSV loading. I do not think re-read the file is a good idea since IO manipulation is very time consuming, fetch from main memory took about 100 nanosec, read 1MB sequentially from memory took 250,000 nanosec((<a href="http://norvig.com/21-days.html">This link give a measurement</a>)). </p>

<p>I think, if we want to make file reading faster, we could try our best to minimize the time of IO manipulation(trading memory for speed), next step is speed up the processing speed of string. </p>

<p>I would generate a file around 50MB to do the test, write a new class to parsed the CSV file. Test the performance with different solutions, including boost::spirit and multithread. spirit is very fast, but the compile time error messages are crazy, I will write down details comments if we decide to use spirit to boost speed up.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/660#issuecomment-223195166">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFCI0r1OymDOAebFPCyhTgge5Hq9Fks5qHmHigaJpZM4Iq0a1">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFCJr59-a04NaDbYY_WH7JQ52Ybguks5qHmHigaJpZM4Iq0a1.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/660#issuecomment-223195166"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>