PERF: Slow down in DF sort() functions from Pandas 0.12 to 0.13?
I've noticed a major loss of performance in the use of DataFrame sort() functions when switching from Pandas 0.12.0 to Pandas 0.13.1. Does anyone know what it is due to?

For example let's execute the following code in both environments (see below for show_version() outputs):

``` python
from itertools import product
idx_values = list(product([0,1,2],range(100),range(700),range(5)))
idx = pd.MultiIndex.from_tuples(idx_values)
df = pd.DataFrame(np.array(np.random.random([len(idx),10])), idx)
print df
print df.index.is_lexsorted()
```

```
<class 'pandas.core.frame.DataFrame'>
MultiIndex: 1050000 entries, (0, 0, 0, 0) to (2, 99, 699, 4)
Data columns (total 10 columns):
...
True
```

So far so good and there is no significant difference in speed. But now sorting the (already sorted) data yields:

``` python
timeit df.sortlevel()
```

```
10 loops, best of 3: 97 ms per loop  # Pd0.12
10 loops, best of 3: 487 ms per loop  # Pd0.13.1
```

The difference can be worse and reaches factors of 30+ with the following index for example:

``` python
idx2 = pd.MultiIndex.from_tuples(list(product(
    [0,1,2],
    pd.date_range('20140101','20140331'),
    pd.date_range('20120101','20131231'),
    range(5))))
df2 = pd.DataFrame(np.array(np.random.random([len(idx2),10])), idx2)
timeit df2.sortlevel()
```

```
10 loops, best of 3: 99 ms per loop  # Pd0.12
1 loops, best of 3: 3.81 s per loop  # Pd0.13.1
```

Notice that both indexes having roughly the same length, the execution time for the last 2 examples is similar under Pd0.12. However that is not the case for Pd0.13, which becomes yet much slower when using dates.

This also applies to sort(), inplace sorting, non-presorted data, and non-multiindex data. For example

``` python
idx3 = pd.date_range('1999-12-31', '1900-01-01', freq='-1D')
df3 = pd.DataFrame(np.array(np.random.random([len(idx3),10])), idx3)
timeit df3.sort()
```

```
100 loops, best of 3: 2.15 ms per loop  # Pd0.12
100 loops, best of 3: 3.85 ms per loop  # Pd0.13.1
```

Here is the output of show_versions(). Everything is identical in both environments except the 'pandas' line:

```
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Darwin
OS-release: 13.1.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: ja_JP.UTF-8

pandas: 0.12.0 -> 0.13.1
Cython: 0.20
numpy: 1.8.0
scipy: 0.13.2
statsmodels: None
IPython: 1.2.1
sphinx: None
patsy: None
scikits.timeseries: None
dateutil: 2.2
pytz: 2013.9
bottleneck: 0.7.0
tables: 3.0.0
numexpr: 2.2.2
matplotlib: 1.1.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
sqlalchemy: 0.9.1
lxml: None
bs4: None
html5lib: None
bq: None
apiclient: None
```
