Skip to content

Commit ba970d4

Browse files
committed
adding more test cases (freakish performance with old hashes)
1 parent 3aa2cbf commit ba970d4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

asv_bench/benchmarks/hash_functions.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,20 @@ def time_factorize(self, exponent):
124124

125125
def time_unique(self, exponent):
126126
pd.unique(self.a2)
127+
128+
129+
class NumericSeriesIndexing:
130+
131+
params = [
132+
(pd.Int64Index, pd.UInt64Index, pd.Float64Index),
133+
(10 ** 4, 10 ** 5, 5 * 10 ** 5, 10 ** 6, 5 * 10 ** 6),
134+
]
135+
param_names = ["index_dtype", "N"]
136+
137+
def setup(self, index, N):
138+
indices = index(list(range(55)) + [54] + list(range(55, N - 1)))
139+
self.data = pd.Series(np.arange(N), index=indices)
140+
141+
def time_loc_slice(self, index, N):
142+
# trigger building of mapping
143+
self.data.loc[:800]

0 commit comments

Comments
 (0)