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 23, 2017
1 parent b6c0f19 commit 3827072
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Empty file.
20 changes: 20 additions & 0 deletions asv_bench/benchmarks/index_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,23 @@ 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
idx = Index(range(10))
self.ridx = [idx] * N
self.iidx = [idx.astype(int)] * N
self.oidx = [idx.astype(str)] * N

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 3827072

Please sign in to comment.