Closed
Description
In the frame_ctor.py
benchmark, FromDictwithTimestampOffset
which perform a lot of setup just to benchmark a dict of Timestamp keys (with an offset) and float values. Given that it's the longest benchmark to run (xref #16803), I'd be great if this benchmark can be cut down to just test one offset.
For example, contructing a DataFrame from this dict of Timestamps with offsets/floats is pretty constant regardless of offset at n=100.
asv dev -b ^frame_ctor.FromDictwithTimestampOffsets
· Discovering benchmarks
· Running 1 total benchmarks (1 commits * 1 environments * 1 benchmarks)
[ 0.00%] ·· Building for existing-py_home_matt_anaconda_envs_pandas_dev_bin_python
[ 0.00%] ·· Benchmarking existing-py_home_matt_anaconda_envs_pandas_dev_bin_python
[100.00%] ··· Running frame_ctor.FromDictwithTimestampOffsets.time_frame_ctor ok
[100.00%] ····
==================== ======== ========
-- n_steps
-------------------- -----------------
offset 1 2
==================== ======== ========
Day 11.6ms 11.8ms
BusinessDay 11.6ms 11.6ms
BDay 11.6ms 11.6ms
CustomBusinessDay 11.6ms 11.6ms
CDay 11.6ms 11.7ms
CBMonthEnd 11.6ms 11.7ms
CBMonthBegin 11.7ms 11.5ms
MonthBegin 11.5ms 11.7ms
BMonthBegin 11.5ms 11.5ms
MonthEnd 11.8ms 11.5ms
BMonthEnd 11.5ms 11.7ms
SemiMonthEnd 11.6ms 11.5ms
SemiMonthBegin 11.6ms 11.6ms
BusinessHour 11.8ms 11.7ms
CustomBusinessHour 11.6ms 11.6ms
YearBegin 11.4ms 11.8ms
BYearBegin 11.5ms 11.6ms
YearEnd 11.5ms 11.5ms
BYearEnd 11.8ms 11.6ms
QuarterBegin 11.5ms 11.5ms
BQuarterBegin 11.5ms 11.6ms
QuarterEnd 11.6ms 11.7ms
BQuarterEnd 11.6ms 11.9ms
LastWeekOfMonth 11.6ms 11.8ms
Week 11.6ms 11.7ms
WeekOfMonth 11.6ms 11.5ms
Easter 11.6ms 11.6ms
Hour 11.5ms 11.4ms
Minute 11.6ms 11.7ms
Second 11.7ms 11.5ms
Milli 11.6ms 11.6ms
Micro 11.4ms 11.4ms
Nano 9.33ms 9.23ms
DateOffset 11.7ms 11.8ms
FY5253_1 11.6ms 11.5ms
FY5253_2 11.8ms 11.7ms
FY5253Quarter_1 11.7ms 11.7ms
FY5253Quarter_2 11.7ms 12.2ms
==================== ======== ========