Skip to content
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

PERF: op(frame, series) when series is not EA #33600

Merged
merged 20 commits into from
Apr 25, 2020

Conversation

jbrockmendel
Copy link
Member

We have the same optimization in place for the flex ops.

ipython results for the asv this adds:

In [3]: arr = np.arange(10 ** 6).reshape(100, -1)                                                                                                                                                                   
In [4]: df = pd.DataFrame(arr)                                                                                                                                                                                         
In [5]: df["C"] = 1.0                                                                                                                                                                                               
In [6]: row = df.iloc[0]                                                                                                                                                                                            

In [11]: %timeit df + row                                                                                                                                                                                           
1.92 s ± 71.1 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)   # <-- master
1 ms ± 19.2 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)  # <-- PR

@jbrockmendel
Copy link
Member Author

@WillAyd any guesses why the benchmark check would be exiting at 50%?

@jbrockmendel
Copy link
Member Author

hmm when i run asv dev locally it stops at 50% but with exit code 0. any guesses @datapythonista ?

@datapythonista
Copy link
Member

hmm when i run asv dev locally it stops at 50% but with exit code 0. any guesses @datapythonista ?

I tried asv run locally with master, and it worked well until the end. Is it just asv dev, or just this PR that is stopping half way? I don't see why this should happen.

@jreback jreback added Numeric Operations Arithmetic, Comparison, and Logical operations Performance Memory or execution speed performance labels Apr 21, 2020
@jreback jreback added this to the 1.1 milestone Apr 21, 2020
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.

lgtm. can you add a whatsnew note & an asv that covers this.

@datapythonista
Copy link
Member

Tried asv dev locally, and also stopped at 50%. Is there an issue for it? I see that last release of asv was a year ago, so I guess it's something in our side.

@jbrockmendel
Copy link
Member Author

Looks like the asv issue is actually that this causes an unrelated benchmark to fail. Am troubleshooting now and will add an appropriate test.

@jbrockmendel
Copy link
Member Author

lgtm. can you add a whatsnew note & an asv that covers this.

done

@jreback jreback merged commit a7741e3 into pandas-dev:master Apr 25, 2020
@jbrockmendel jbrockmendel deleted the perf-arith-series branch April 25, 2020 21:46
rhshadrach pushed a commit to rhshadrach/pandas that referenced this pull request May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

None yet

3 participants