Skip to content

Commit

Permalink
PERF: test indexes concat
Browse files Browse the repository at this point in the history
  • Loading branch information
toobaz committed Aug 24, 2017
1 parent b6c0f19 commit 6324b86
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Empty file.
19 changes: 19 additions & 0 deletions asv_bench/benchmarks/index_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,22 @@ def time_datetime_level_values_full(self):

def time_datetime_level_values_sliced(self):
self.mi[:10].values


class IndexOps(object):
goal_time = 0.2

def setup(self):
N = 1000
self.ridx = [RangeIndex(i*100, (i + 1) * 100) for i in range(N)]
self.iidx = [idx.astype(int) for idx in self.ridx]
self.oidx = [idx.astype(str) for idx in self.iidx]

def time_concat_range(self):
self.ridx[0].append(self.ridx[1:])

def time_concat_int(self):
self.iidx[0].append(self.iidx[1:])

def time_concat_obj(self):
self.oidx[0].append(self.oidx[1:])

0 comments on commit 6324b86

Please sign in to comment.