Skip to content

34297 sub slow in first call #34354

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 10 commits into from
May 26, 2020

Conversation

phofl
Copy link
Member

@phofl phofl commented May 24, 2020

@jbrockmendel

I added a lenght check as suggested by you. I could not find another method to check the indices (nlevels for example does not work). I'm open to recommendations about adding additional checks before running into the values call.

I have added a test, which measures the execution time of both calls to sub. Is there a better way to test, if they are equally fast?

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

can you also add a note in perf section for 1.1

@jreback jreback added Benchmark Performance (ASV) benchmarks MultiIndex Numeric Operations Arithmetic, Comparison, and Logical operations Performance Memory or execution speed performance labels May 25, 2020
@phofl
Copy link
Member Author

phofl commented May 25, 2020

can you also add a note in perf section for 1.1

Added the whats new entry.

� Conflicts:
�	doc/source/whatsnew/v1.1.0.rst
@phofl phofl requested a review from jreback May 26, 2020 08:57
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

small edit, ping on green.

columns=column_names,
)

def time_sub_multiindex(self, func):
Copy link
Contributor

Choose a reason for hiding this comment

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

can you rename to: time_binary_op_multiindex

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@jreback jreback added this to the 1.1 milestone May 26, 2020
@phofl phofl requested a review from jreback May 26, 2020 14:53
@jreback jreback merged commit aefe1a3 into pandas-dev:master May 26, 2020
@jreback
Copy link
Contributor

jreback commented May 26, 2020

thanks @phofl

@phofl phofl deleted the 34297_sub_slow_in_first_call branch May 27, 2020 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Benchmark Performance (ASV) benchmarks MultiIndex Numeric Operations Arithmetic, Comparison, and Logical operations Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Subsequent calls to df.sub() are much faster than the first call
3 participants