Skip to content

Commit 6a7cb72

Browse files
committed
adding sorted benchmark
2 parents 821966e + 8048f97 commit 6a7cb72

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

asv_bench/benchmarks/hash_functions.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,27 @@
33
import pandas as pd
44

55

6+
class IsinWithArangeSorted:
7+
params = [
8+
[np.float64, np.int64, np.object],
9+
[
10+
1_000,
11+
2_000,
12+
8_000,
13+
100_000,
14+
1_000_000,
15+
],
16+
]
17+
param_names = ["dtype", "M"]
18+
19+
def setup(self, dtype, M):
20+
self.s = pd.Series(np.arange(M)).astype(dtype)
21+
self.values = np.arange(M).astype(dtype)
22+
23+
def time_isin(self, dtype, M):
24+
self.s.isin(self.values)
25+
26+
627
class IsinWithArange:
728
params = [
829
[np.float64, np.int64, np.object],

0 commit comments

Comments
 (0)