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

[WIP] Improvement in satask #17144

Open
wants to merge 12 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@ShubhamKJha
Copy link
Member

commented Jul 3, 2019

References to other Issues or PRs

Built over #11789.
A lot of time in the execution of satask is wasted in unnecessary creation of And and Or objects. This PR tries to remove these intermediate steps.
The current results in performance:

Tests This PR Master
test_satask 2.39 s 36.26 s
assumptions\tests 16.74 127.21

Brief description of what is fixed or changed

Other comments

Release Notes

  • assumptions
    • Performance of satask is now improved.
@sympy-bot

This comment has been minimized.

Copy link

commented Jul 3, 2019

Hi, I am the SymPy bot (v147). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.5.

Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it.

Click here to see the pull request description that was parsed.

<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234". See
https://github.com/blog/1506-closing-issues-via-pull-requests . Please also
write a comment on that issue linking back to this pull request once it is
open. -->
Built over  #11789.
A lot of time in the execution of `satask` is wasted in unnecessary creation of `And` and `Or` objects. This PR tries to remove these intermediate steps.
The current results in performance:

| Tests             | This PR             |  Master        |
| ------------- | -------------     | -------------|
| test_satask    | 2.39 s   | 36.26 s|
| assumptions\tests | 16.74     | 127.21 |

#### Brief description of what is fixed or changed


#### Other comments


#### Release Notes

<!-- Write the release notes for this release below. See
https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more information
on how to write release notes. The bot will check your release notes
automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
* assumptions
  * Performance of satask is now improved.
<!-- END RELEASE NOTES -->

@oscargus

This comment has been minimized.

Copy link
Contributor

commented Jul 6, 2019

Looks promising! However, since you base it on #11789 you should include those commits here (with correct authorship). Not sure how to go that in an easy way though, but maybe someone else knows.

@oscargus

This comment has been minimized.

Copy link
Contributor

commented Jul 6, 2019

Not sure that all of these are from assumptions, but many are:

___________________________ unexpectedly fast tests ____________________________
...
test_pow_pos_neg - Took 0.588 seconds
test_zero - Took 1.123 seconds
test_negative - Took 1.177 seconds
test_bounded1 - Took 1.498 seconds
test_hermitian - Took 1.518 seconds
test_positive - Took 1.681 seconds
test_pow2 - Took 1.867 seconds
test_pow4 - Took 1.883 seconds
test_bounded3 - Took 1.955 seconds
test_real_pow - Took 2.641 seconds
test_pow3 - Took 2.760 seconds
test_bounded2a - Took 3.033 seconds
test_even_query - Took 3.134 seconds
test_issue_11238 - Took 4.158 seconds
test_odd_query - Took 4.445 seconds

Nice!

@codecov

This comment has been minimized.

Copy link

commented Jul 13, 2019

Codecov Report

Merging #17144 into master will increase coverage by 0.042%.
The diff coverage is 89.041%.

@@             Coverage Diff              @@
##            master   #17144       +/-   ##
============================================
+ Coverage   74.487%   74.53%   +0.042%     
============================================
  Files          623      623               
  Lines       161339   161694      +355     
  Branches     37863    37943       +80     
============================================
+ Hits        120178   120511      +333     
+ Misses       35833    35829        -4     
- Partials      5328     5354       +26
@oscarbenjamin

This comment has been minimized.

Copy link
Contributor

commented Jul 13, 2019

@ShubhamKJha this looks like it will be useful but you need to fix the attribution of the commits.

The way I would do this is to start a new branch as a copy of the old PR (with previous author information intact), rebase that on current master, then apply my changes on top.

@ShubhamKJha

This comment has been minimized.

Copy link
Member Author

commented Jul 14, 2019

Hi @oscarbenjamin and @oscargus, I didn't start from that PR, so I faced many merge conflicts on a local branch I tried. Also, since both PRs have some content in same files, the code is getting merged unexpectedly (it may need more than merging). Anyhow, this is a WIP branch and I would try to give proper attribution to the original commits once things work out. I would then open another PR over this.

@asmeurer

This comment has been minimized.

Copy link
Member

commented Jul 15, 2019

I think the simplest way would be to take this branch and rebase it on top of Ronan's. Another option, if you want to avoid fixing merge conflicts for each commit, would be to merge Ronan's branch into this one, but with the merge conflict resolution set to keep the changes here (I think it's git merge --strategy ours). That way, Ronan's commits will be in the history, but you won't have to deal with actually managing the differences between the two with git. If you go with the latter approach, just explain what is going on in the merge commit message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.