title: Numpy loading csv TOO slow compared to Matlab
body: <p>I posted this question because I was wondering whether I did something terribly wrong to get this result.</p>
  
  <p>I have a medium-size csv file and I tried to use numpy to load it. For illustration, I made the file using python:</p>
  
  <pre><code>import timeit
  import numpy as np
  
  my_data = np.random.rand(1500000, 3)*10
  np.savetxt('./test.csv', my_data, delimiter=',', fmt='%.2f')
  </code></pre>
  
  <p>And then, I tried two methods: numpy.genfromtxt, numpy.loadtxt</p>
  
  <pre><code>setup_stmt = 'import numpy as np'
  stmt1 = """\
  my_data = np.genfromtxt('./test.csv', delimiter=',')
  """
  stmt2 = """\
  my_data = np.loadtxt('./test.csv', delimiter=',')
  """
  
  t1 = timeit.timeit(stmt=stmt1, setup=setup_stmt, number=3)
  t2 = timeit.timeit(stmt=stmt2, setup=setup_stmt, number=3)
  </code></pre>
  
  <p>And the result shows that <strong>t1 = 32.159652940464184, t2 = 52.00093725634724</strong>.<br>
  However, When I tried using matlab:</p>
  
  <pre><code>tic
  for i = 1:3
      my_data = dlmread('./test.csv');
  end
  toc
  </code></pre>
  
  <p>The result shows: Elapsed time is <strong>3.196465 seconds</strong>.</p>
  
  <p>I understand that there may be some differences in the loading speed, but:  </p>
  
  <ol>
  <li>This is much more than I expected;  </li>
  <li>Isn't it that np.loadtxt should be faster than np.genfromtxt?  </li>
  <li>I haven't tried python csv module yet because loading csv file is a really frequent thing I do and with the csv module, the coding is a little bit verbose... But I'd be happy to try it if that's the only way. Currently I am more concerned about whether it's me doing something wrong.  </li>
  </ol>
  
  <p>Any input would be appreciated. Thanks a lot in advance!</p>