Skip to content

Commit c796a69

Browse files
committed
PERF: benchmark reindexing for CategoricalIndex
1 parent e80761a commit c796a69

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

asv_bench/benchmarks/categoricals.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,5 +277,14 @@ def time_intersection(self):
277277
def time_unique(self):
278278
self.index.unique()
279279

280+
def time_reindex(self):
281+
self.index.reindex(self.index[:500])
282+
283+
def time_reindex_missing(self):
284+
self.index.reindex(['a', 'b', 'c', 'd'])
285+
286+
def time_sort_values(self):
287+
self.index.sort_values(ascending=False)
288+
280289

281290
from .pandas_vb_common import setup # noqa: F401

0 commit comments

Comments
 (0)