pydata/pandas — pull request #8172 by behzadnouri (2014-09-04 00:24:19+00:00)
Title: counting sort instead of np.argsort in left outer join

Previously I had submitted https://github.com/pydata/pandas/pull/7853. Given that we are sorting indices, for performance reasons I should have used `groupsort_indexer` instead of `np.argsort`.

on master:

In [7]: np.random.seed(2718281)

In [8]: n = 50000

In [9]: left = DataFrame(np.random.randint(1, n/500, (n, 2)),
...: columns=['jim', 'joe'])

In [10]: right = DataFrame(np.random.randint(1, n/500, (n, 2)),
....: columns=['jolie', 'jolia']).set_index('jolie')

In [11]: %timeit left.join(right, on='jim')
1 loops, best of 3: 3.53 s per loop
on branch:

In [13]: %timeit left.join(right, on='jim')
1 loops, best of 3: 2.46 s per loop