-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
do not use solve in idiff #23560
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
do not use solve in idiff #23560
Conversation
✅ Hi, I am the SymPy bot (v167). 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.11. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
Benchmark results from GitHub Actions Lower numbers are good, higher numbers are bad. A ratio less than 1 Significantly changed benchmark results (PR vs master) Significantly changed benchmark results (master vs previous release) before after ratio
[77f1d79c] [b1cf21e1]
<sympy-1.10.1^0>
+ 133±1ms 232±2ms 1.74 sum.TimeSum.time_doit
Full benchmark results can be found as artifacts in GitHub Actions |
deq = eq.diff(x) | ||
b = deq.xreplace({dydx: S.Zero}) | ||
a = (deq - b).xreplace({dydx: S.One}) | ||
yp = factor_terms(expand_mul(cancel((-b/a).subs(derivs)), deep=False)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we even need full blown cancel
here? That can be expensive if the expression is large.
References to other Issues or PRs
closes #23554
Brief description of what is fixed or changed
A more optimized internal solving process is used to calculate the derivatives. The existing tests already run faster. The expression below runs about 4X faster relative to master:
The equation given on the issue page runs about 200X faster.
Other comments
It seems like this should be faster than it is.... Would using
cse
help in any way?Release Notes