-
Notifications
You must be signed in to change notification settings - Fork 63
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
feat: improve SparsePoly evaluation #1815
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1815 +/- ##
=========================================
Coverage ? 88.03%
=========================================
Files ? 119
Lines ? 29993
Branches ? 0
=========================================
Hits ? 26403
Misses ? 3590
Partials ? 0 ☔ View full report in Codecov by Sentry. |
src/generic/SparsePoly.jl
Outdated
r *= b^(reinterpret(Int, a.exps[a.length - i + 1] - a.exps[a.length - i])) | ||
r += a.coeffs[a.length - i] | ||
r = mul!(r, r, b^(reinterpret(Int, a.exps[a.length - i + 1] - a.exps[a.length - i]))) | ||
r = addeq!(r, r, a.coeffs[a.length - i]) |
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.
r = addeq!(r, r, a.coeffs[a.length - i]) | |
r = add!(r, r, a.coeffs[a.length - i]) |
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.
addeq!
is deprecated
for i = 1:a.length - 1 | ||
r *= b^(reinterpret(Int, a.exps[a.length - i + 1] - a.exps[a.length - i])) | ||
r += a.coeffs[a.length - i] | ||
r = mul!(r, r, b^(reinterpret(Int, a.exps[a.length - i + 1] - a.exps[a.length - i]))) |
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.
r = mul!(r, r, b^(reinterpret(Int, a.exps[a.length - i + 1] - a.exps[a.length - i]))) | |
r = mul!(r, b^(reinterpret(Int, a.exps[a.length - i + 1] - a.exps[a.length - i]))) |
you can make use of the shorthand if the first and second arg are identical (at most of the changed places)
No description provided.