Skip to content

Commit

Permalink
CLN: ASV frame_methods benchmark (#18536)
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke authored and jorisvandenbossche committed Nov 29, 2017
1 parent 32f562d commit 48c5bfc
Show file tree
Hide file tree
Showing 5 changed files with 330 additions and 397 deletions.
15 changes: 15 additions & 0 deletions asv_bench/benchmarks/frame_ctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,18 @@ def setup(self, offset, n_steps):

def time_frame_ctor(self, offset, n_steps):
DataFrame(self.d)


class FromRecords(object):

goal_time = 0.2
params = [None, 1000]
param_names = ['nrows']

def setup(self, nrows):
N = 100000
self.gen = ((x, (x * 20), (x * 100)) for x in range(N))

def time_frame_from_records_generator(self, nrows):
# issue-6700
self.df = DataFrame.from_records(self.gen, nrows=nrows)
Loading

0 comments on commit 48c5bfc

Please sign in to comment.