title: Why is pd.concat({}, axis=1) slower than pd.concat({}, axis=0).unstack(0)?
body: <p>Consider this dictionary of pandas series.  The index on all series are integers and have some potential overlap, but certainly do not coincide.  I made an observation that <code>pd.concat</code> seems slow when combining things along <code>axis=1</code> when I have large indices, lots of non-overlap, and many items to concatenate.  It prompted me to leave <code>axis=0</code> and subsequently <code>unstack()</code>.  I end up with the same exact result.  But unstacking is quicker.</p>
  
  <p>Does anyone have a handle on why this would be the case?</p>
  
  <p>I get that concatenating series on top of one another should be quick, but I would have guessed that the unstacking processes would have been near identical as <code>pd.concat(axis=1)</code>.</p>
  
  <pre><code>dict_of_series = {
      's%s' % i: pd.Series(
          1, np.unique(np.random.randint(1000, 10000, size=1000))
      ) for i in range(100)
  }
  </code></pre>
  
  <hr>
  
  <pre><code>%%timeit
  pd.concat(dict_of_series, axis=0).unstack(0)
  </code></pre>
  
  <blockquote>
    <p>10 loops, best of 3: 29.6 ms per loop</p>
  </blockquote>
  
  <pre><code>%%timeit
  pd.concat(dict_of_series, axis=1)
  </code></pre>
  
  <blockquote>
    <p>10 loops, best of 3: 43.1 ms per loop</p>
  </blockquote>