Skip to content

PERF: GH28635 Add ASV benchmark for resample after groupby #49274

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 2 commits into from
Oct 24, 2022

Conversation

krasch
Copy link
Contributor

@krasch krasch commented Oct 24, 2022

@krasch krasch changed the title GH28635 Add ASV benchmark for resample after groupby PERF: GH28635 Add ASV benchmark for resample after groupby Oct 24, 2022
Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution. Couple of comments.

What is the runtime of the benchmark? We aim for something like 20ms in general.

@krasch
Copy link
Contributor Author

krasch commented Oct 24, 2022

What is the runtime of the benchmark? We aim for something like 20ms in general

The code as I had first submitted it took 100ms per tested function for one run on my machine, I reduced the size of the dataset so that it is below 20ms now on my machine [1]. Of course my machine is not necessarily representative... If this is not the right aproach, anything I should be doing differently?

asv run -e -E existing -b groupby.Resample --durations

[25.00%] ··· Running (groupby.Resample.time_resample--)..
[75.00%] ··· groupby.Resample.time_resample                                       16.2±0.4ms
[100.00%] ··· groupby.Resample.time_resample_multiindex                           16.9±0.5ms
[100.00%] ·· =========================================== ================
                              benchmark                   total duration 
             ------------------------------------------- ----------------
              groupby.Resample.time_resample_multiindex       508ms      
                    groupby.Resample.time_resample            508ms      
                                total                         1.02s      
             =========================================== ================

@phofl
Copy link
Member

phofl commented Oct 24, 2022

Great, thx

@phofl phofl added this to the 2.0 milestone Oct 24, 2022
@phofl phofl added Groupby Resample resample method Benchmark Performance (ASV) benchmarks labels Oct 24, 2022
@phofl phofl merged commit a6e61fe into pandas-dev:main Oct 24, 2022
@phofl
Copy link
Member

phofl commented Oct 24, 2022

thx @krasch

@krasch krasch deleted the resample_asv branch October 25, 2022 08:19
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Benchmark Performance (ASV) benchmarks Groupby Resample resample method
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resample on MultiIndex level takes much more time than on normal column
2 participants