Skip to content

Commit f3d8365

Browse files
committed
added benchmark
1 parent fdb48bf commit f3d8365

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

asv_bench/benchmarks/timeseries.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,19 @@ def time_format_YYYYMMDD(self):
300300
to_datetime(self.stringsD, format='%Y%m%d')
301301

302302

303+
class ToDatetimeCacheSmallCount(object):
304+
305+
params = ([True, False], [50, 500, 5000, 100000])
306+
param_names = ['cache', 'count']
307+
308+
def setup(self, cache, count):
309+
rng = date_range(start='1/1/1971', periods=count)
310+
self.unique_date_strings = rng.strftime('%Y-%m-%d').tolist()
311+
312+
def time_unique_date_strings(self, cache, count):
313+
to_datetime(self.unique_date_strings, cache=cache)
314+
315+
303316
class ToDatetimeISO8601:
304317

305318
def setup(self):

0 commit comments

Comments
 (0)