[Merged by Bors] - perf: improve some instances in Polynomial#7434
[Merged by Bors] - perf: improve some instances in Polynomial#7434ChrisHughes24 wants to merge 3 commits intomasterfrom
Conversation
|
!bench |
|
Here are the benchmark results for commit c5bca0a. Benchmark Metric Change
=================================================================================
+ ~Mathlib.AlgebraicGeometry.EllipticCurve.Point instructions -40.6%
+ ~Mathlib.AlgebraicGeometry.EllipticCurve.Weierstrass instructions -19.5%
- ~Mathlib.Data.Polynomial.Basic instructions 20.3%
+ ~Mathlib.Data.Polynomial.Div instructions -8.7%
+ ~Mathlib.Data.Polynomial.Lifts instructions -7.6%
+ ~Mathlib.FieldTheory.Finite.GaloisField instructions -15.9%
+ ~Mathlib.FieldTheory.IsAlgClosed.Spectrum instructions -8.2%
+ ~Mathlib.FieldTheory.IsSepClosed instructions -7.4%
+ ~Mathlib.FieldTheory.Normal instructions -6.3%
+ ~Mathlib.FieldTheory.Perfect instructions -5.8%
+ ~Mathlib.FieldTheory.PrimitiveElement instructions -7.5%
+ ~Mathlib.FieldTheory.SplittingField.Construction instructions -11.6%
+ ~Mathlib.FieldTheory.SplittingField.IsSplittingField instructions -8.7%
+ ~Mathlib.LinearAlgebra.AnnihilatingPolynomial instructions -26.1%
+ ~Mathlib.LinearAlgebra.FreeModule.Norm instructions -61.0%
+ ~Mathlib.LinearAlgebra.Lagrange instructions -5.8%
+ ~Mathlib.LinearAlgebra.Matrix.Charpoly.Basic instructions -9.7%
+ ~Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff instructions -7.6%
+ ~Mathlib.LinearAlgebra.Matrix.Charpoly.FiniteField instructions -24.9%
+ ~Mathlib.NumberTheory.BernoulliPolynomials instructions -6.7%
+ ~Mathlib.NumberTheory.ClassNumber.AdmissibleCardPowDegree instructions -6.3%
+ ~Mathlib.NumberTheory.ClassNumber.FunctionField instructions -20.5%
+ ~Mathlib.NumberTheory.KummerDedekind instructions -7.0%
+ ~Mathlib.RingTheory.AdjoinRoot instructions -49.9%
+ ~Mathlib.RingTheory.AlgebraicIndependent instructions -5.1%
+ ~Mathlib.RingTheory.Jacobson instructions -33.6%
+ ~Mathlib.RingTheory.JacobsonIdeal instructions -8.9%
+ ~Mathlib.RingTheory.Polynomial.Chebyshev instructions -5.3%
+ ~Mathlib.RingTheory.Polynomial.GaussLemma instructions -6.7%
+ ~Mathlib.RingTheory.Polynomial.Nilpotent instructions -8.9%
+ ~Mathlib.RingTheory.Polynomial.Quotient instructions -28.4%
+ ~Mathlib.RingTheory.RootsOfUnity.Minpoly instructions -7.9% |
|
Note also that build instructions (a measurement of total build time) goes down 0.92%. 🎉 |
| @@ -291,18 +291,27 @@ instance natCast : NatCast R[X] := | |||
| #align polynomial.has_nat_cast Polynomial.natCast | |||
|
|
|||
| instance semiring : Semiring R[X] := | |||
There was a problem hiding this comment.
Would building up through the hierarchy to Semiring R[X] yield even better performance? Or would it be middling?
There was a problem hiding this comment.
Same with other ones below.
There was a problem hiding this comment.
Possibly. I don't see why it would but it is certainly possible that it could because I don't fully understand this stuff
There was a problem hiding this comment.
How about merging this and I experiment with further improvements in another PR?
|
bors d+ |
|
✌️ ChrisHughes24 can now approve this pull request. To approve and merge a pull request, simply reply with |
|
bors r+ |
|
Pull request successfully merged into master. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Uh oh!
There was an error while loading. Please reload this page.