title: Why is pandas.to_datetime slow for non standard time format such as '2014/12/31'
body: <p>I have a .csv file in such format</p>
  
  <pre><code>timestmp, p
  2014/12/31 00:31:01:9200, 0.7
  2014/12/31 00:31:12:1700, 1.9
  ...
  </code></pre>
  
  <p>and when read via <code>pd.read_csv</code> and convert the time str to datetime using <code>pd.to_datetime</code>, the performance drops dramatically. Here is a minimal example.</p>
  
  <pre><code>import re
  import pandas as pd
  
  d = '2014-12-12 01:02:03.0030'
  c = re.sub('-', '/', d)
  
  %timeit pd.to_datetime(d)
  %timeit pd.to_datetime(c)
  %timeit pd.to_datetime(c, format="%Y/%m/%d %H:%M:%S.%f")
  </code></pre>
  
  <p>and the performances are:</p>
  
  <pre><code>10000 loops, best of 3: 62.4 µs per loop
  10000 loops, best of 3: 181 µs per loop
  10000 loops, best of 3: 82.9 µs per loop
  </code></pre>
  
  <p>so, how could I improve the performance of <code>pd.to_datetime</code> when reading date from a csv file?</p>