PERF: improve perf of float-based timeseries plotting by jorisvandenbossche · Pull Request #15073 · pandas-dev/pandas (original) (raw)
xref #15071
_dt_to_float_ordinal was already vectorized, so no need to map it on the index.
So now is 'irregular' plotting even faster as period-based plotting:
$ asv continuous upstream/master HEAD -b TimeseriesPlotting
...
· Running 4 total benchmarks (2 commits * 1 environments * 2 benchmarks)
[ 0.00%] · For pandas commit hash 4fc0dca6:
[ 0.00%] ·· Benchmarking conda-py2.7-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt
[ 25.00%] ··· Running plotting.TimeseriesPlotting.time_plot_regular 126.57ms
[ 50.00%] ··· Running plotting.TimeseriesPlotting.time_plot_regular_compat 87.57ms
[ 50.00%] · For pandas commit hash de09c988:
[ 50.00%] ·· Benchmarking conda-py2.7-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt
[ 75.00%] ··· Running plotting.TimeseriesPlotting.time_plot_regular 126.01ms
[100.00%] ··· Running plotting.TimeseriesPlotting.time_plot_regular_compat 305.58ms
before after ratio
[de09c988] [4fc0dca6]
- 305.58ms 87.57ms 0.29 plotting.TimeseriesPlotting.time_plot_regular_compat