def lookup_khash(values): table = sbx.PyObjectHashTable(len(values)) table.map_locations(values) locs = table.lookup_locations(values) # elapsed = _timeit(lambda: table.lookup_locations2(values)) return table
def g(): table = sbx.PyObjectHashTable(len(df)) ret = table.factorize(df['A']) return ret
def f(): table = sbx.PyObjectHashTable(len(arr)) table.map_locations(arr)