Skip to content

CLN: ASV binary ops benchmark #18444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 25, 2017
Merged

Conversation

mroeschke
Copy link
Member

  • Utilized params of timezones in the Timeseries class instead of creating a subclass of TimeseriesTZ

  • Division was being tested instead of modulo in time_frame_int_mod and time_frame_float_mod

  • Added np.random.seed(1234) in setup classes where random data is created xref BENCH: put in np.random.seed on vbenches #8144

  • Renamed time_timestamp_ops_diff2 to time_timestamp_ops_diff_with_shift

  • Replaced the depreciated np.random.random_integers with np.random.randint

  • Ran flake8 and replaced star imports

asv run -q -b ^binary_ops
[  0.00%] ·· Benchmarking conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt
[  7.14%] ··· Running binary_ops.Ops.time_frame_add                                                                                 46.1ms;...
[ 14.29%] ··· Running binary_ops.Ops.time_frame_comparison                                                                          16.5ms;...
[ 21.43%] ··· Running binary_ops.Ops.time_frame_mult                                                                                55.3ms;...
[ 28.57%] ··· Running binary_ops.Ops.time_frame_multi_and                                                                            126ms;...
[ 35.71%] ··· Running binary_ops.Ops2.time_frame_float_div                                                                              73.0ms
[ 42.86%] ··· Running binary_ops.Ops2.time_frame_float_div_by_zero                                                                      80.7ms
[ 50.00%] ··· Running binary_ops.Ops2.time_frame_float_floor_by_zero                                                                    83.9ms
[ 57.14%] ··· Running binary_ops.Ops2.time_frame_float_mod                                                                              25.3ms
[ 64.29%] ··· Running binary_ops.Ops2.time_frame_int_div_by_zero                                                                        97.2ms
[ 71.43%] ··· Running binary_ops.Ops2.time_frame_int_mod                                                                                46.1ms
[ 78.57%] ··· Running binary_ops.Timeseries.time_series_timestamp_compare                                                           5.40ms;...
[ 85.71%] ··· Running binary_ops.Timeseries.time_timestamp_ops_diff                                                                 42.8ms;...
[ 92.86%] ··· Running binary_ops.Timeseries.time_timestamp_ops_diff_with_shift                                                       157ms;...
[100.00%] ··· Running binary_ops.Timeseries.time_timestamp_series_compare                                                           5.55ms;...

@codecov
Copy link

codecov bot commented Nov 23, 2017

Codecov Report

Merging #18444 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18444      +/-   ##
==========================================
- Coverage   91.34%   91.32%   -0.02%     
==========================================
  Files         163      163              
  Lines       49717    49717              
==========================================
- Hits        45413    45404       -9     
- Misses       4304     4313       +9
Flag Coverage Δ
#multiple 89.12% <ø> (ø) ⬆️
#single 40.51% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.8% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 412988e...371138a. Read the comment docs.

@jreback jreback added the Benchmark Performance (ASV) benchmarks label Nov 23, 2017
@jreback jreback added this to the 0.22.0 milestone Nov 23, 2017
goal_time = 0.2

def setup(self):
self.N = 1000000
params = [None, 'US/Eastern']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http://asv.readthedocs.io/en/latest/writing_benchmarks.html

we can add params_names (here) and elsewhere (just for readibility)

@mroeschke mroeschke force-pushed the asv_clean_binary_ops branch from e8af713 to d102613 Compare November 24, 2017 06:51
def setup(self):
self.N = 1000000
params = [None, 'US/Eastern']
param_names = ['timezone']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am shocked this works, seeing that the param_names should be ['tz']

@mroeschke mroeschke force-pushed the asv_clean_binary_ops branch from d102613 to 371138a Compare November 25, 2017 00:35
@mroeschke
Copy link
Member Author

Yeah I have noticed ASV has some interesting quirks. Nonetheless for consistency, I changed timezone to tz

@jreback jreback merged commit b71ecbd into pandas-dev:master Nov 25, 2017
@jreback
Copy link
Contributor

jreback commented Nov 25, 2017

thanks!

@mroeschke mroeschke deleted the asv_clean_binary_ops branch December 20, 2017 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Benchmark Performance (ASV) benchmarks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants