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

Eltype fix; use T[] for 0-polynomial; speed up LaurentPolynomial operations #487

Merged
merged 5 commits into from
Apr 3, 2023

Conversation

jverzani
Copy link
Member

more generic

  • In Remove buggy type computation in scalar_mult. #485 it was suggested to not guess output types of scalar multiplication. This moves more in that direction
  • Uses T[] for the coefficients of a 0 polynomial, not T[0], which requires zero(T). This led to some fixes on evaluation and changed some tests
  • new test in display of values which are 1 (hasone(T)) allows a few other polynomial constructions to be displayed

Speedups

  • A comment in the LaurentPolynomials.jl package suggested performance problems with the LaurentPolynomial type. New approaches for * and + were added. Also, gcdx and powermod were borrowed from that package.
  • The SparsePolynomial had a few arithmetic speedups, though it is still quite slow by comparison.
  • fixed regression in scalar multiplication for the ImmutablePolynomial type

@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Patch coverage: 78.50% and project coverage change: -2.62 ⚠️

Comparison is base (f5b20cd) 83.25% compared to head (c21f2af) 80.64%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #487      +/-   ##
==========================================
- Coverage   83.25%   80.64%   -2.62%     
==========================================
  Files          24       25       +1     
  Lines        3045     3151     +106     
==========================================
+ Hits         2535     2541       +6     
- Misses        510      610     +100     
Impacted Files Coverage Δ
src/abstract.jl 51.02% <ø> (ø)
src/polynomials/pi_n_polynomial.jl 77.77% <14.28%> (-22.23%) ⬇️
src/polynomials/standard-basis.jl 80.10% <40.00%> (-9.14%) ⬇️
src/polynomials/factored_polynomial.jl 86.45% <50.00%> (-0.39%) ⬇️
src/contrib.jl 79.61% <66.66%> (-2.87%) ⬇️
src/show.jl 80.83% <66.66%> (-0.53%) ⬇️
src/polynomials/SparsePolynomial.jl 91.20% <91.42%> (-8.80%) ⬇️
src/polynomials/Polynomial.jl 97.56% <94.11%> (-2.44%) ⬇️
src/common.jl 87.21% <100.00%> (-2.71%) ⬇️
src/polynomials/ImmutablePolynomial.jl 91.59% <100.00%> (-0.28%) ⬇️
... and 2 more

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jverzani jverzani merged commit ddd4340 into JuliaMath:master Apr 3, 2023
@jverzani jverzani deleted the eltype_fix branch April 3, 2023 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant