ENH: Could Numba be used to make the groupby aggregation functions faster?
I have been doing some experiments with Numba and groupby operations such as max() and sum().

Using Numba might make them faster, though my analysis in incomplete as my functions are returning results as ndarrays, rather than Pandas Series (I don't know how large the overhead of creating the Series result is, and can't work out how to create it efficiently).

Here is my code, which shows that if you just return the results as an ndarray, you can get a 5x speed improvement:

```
import numpy as np
import os
import pandas as pd
from numba import autojit

N = 1e7
m = 1e6
p = 1e4

x = np.random.randint( 0, m, N )
y = np.random.randint( 0, p, N )
z = np.random.randn(N)

df = pd.DataFrame( {'x':x, 'y':y, 'z':z} )

key = [ 'x', 'y' ]

grps = df.groupby( key )
print( df.head() )

@autojit
def gb_max( grps, fld ):
    arr                  = grps.obj[ fld ].values
    comp_ids, _, ngroups = grps.grouper.group_info

    result    = np.ndarray( ngroups, dtype=arr.dtype )
    result[:] = np.finfo( np.float ).min

    for i in range( len( comp_ids ) ):        
        cid = comp_ids[i]
        ai = arr[i]

        if arr[i]>result[cid]:
            result[ cid ] = arr[i]
    return result       

pd_max = grps[ 'z' ].max()
nb_max = gb_max( grps, 'z' )
print( pd_max.values )
print( nb_max )
assert np.all( pd_max.values==nb_max ), 'Results are different'

print( 'Timing gb_max' )
get_ipython().magic("timeit s=gb_max( grps, 'y' )")
print( 'Timing pd_max' )
get_ipython().magic("timeit grps['y'].max()")

@autojit
def gb_sum( grps, fld ):
    arr                  = grps.obj[ fld ].values
    comp_ids, _, ngroups = grps.grouper.group_info

    result    = np.ndarray( ngroups, dtype=arr.dtype )    

    for i in range( len( comp_ids ) ):                
        result[ comp_ids[i] ] += arr[i]        
    return result

pd_sum = grps ['y'].sum()
nb_sum = gb_sum( grps, 'y' )

assert np.all( pd_sum.values==nb_sum ), 'Results are different'

print( 'Timing gb_sum' )
get_ipython().magic("timeit gb_sum( grps, 'y' )")
print( 'pandas sum' )
get_ipython().magic("timeit grps ['y'].sum()")

mi = pd.MultiIndex.from_arrays( grps.groups.keys() )
nb_sum2 = pd.DataFrame( data=nb_sum, index=mi )
print( nb_sum2 )
```
