perf (MonoidAlgebra.Basic): reduce withs in structure terms#6319
Closed
mattrobball wants to merge 3 commits intomasterfrom
Closed
perf (MonoidAlgebra.Basic): reduce withs in structure terms#6319mattrobball wants to merge 3 commits intomasterfrom
mattrobball wants to merge 3 commits intomasterfrom
Conversation
Contributor
mattrobball
commented
Aug 2, 2023
Contributor
Author
|
!bench |
eric-wieser
reviewed
Aug 2, 2023
Comment on lines
+297
to
+298
| { liftNC (f : k →+ R) g with | ||
| toFun := liftNC (f : k →+ R) g | ||
| map_one' := liftNC_one _ _ | ||
| map_mul' := fun _a _b => liftNC_mul _ _ _ _ fun {_ _} _ => h_comm _ _ } | ||
| -- { toMonoidHom :=liftNC (f : k →+ R) g with | ||
| { toMonoidHom := { | ||
| toFun := liftNC (f : k →+ R) g | ||
| map_one' := liftNC_one _ _ | ||
| map_mul' := fun _a _b => liftNC_mul _ _ _ _ fun {_ _} _ => h_comm _ _ } |
Member
There was a problem hiding this comment.
Doesn't this generate an identical term?
Contributor
Author
There was a problem hiding this comment.
I don't think so but didn't check
Collaborator
|
Here are the benchmark results for commit bc87b03. Benchmark Metric Change
============================================================================
+ ~Mathlib.Algebra.Category.Ring.Adjunctions instructions -10.6%
+ ~Mathlib.Algebra.FreeNonUnitalNonAssocAlgebra instructions -11.9%
+ ~Mathlib.Algebra.Lie.Free instructions -5.5%
+ ~Mathlib.Algebra.MonoidAlgebra.Basic instructions -5.2%
+ ~Mathlib.Algebra.MonoidAlgebra.Grading instructions -17.3%
+ ~Mathlib.Algebra.MonoidAlgebra.Ideal instructions -5.0%
+ ~Mathlib.AlgebraicGeometry.EllipticCurve.Point instructions -9.3%
+ ~Mathlib.Data.MvPolynomial.Derivation instructions -6.7%
+ ~Mathlib.Data.MvPolynomial.Division instructions -8.2%
+ ~Mathlib.Data.MvPolynomial.Equiv instructions -6.5%
+ ~Mathlib.Data.MvPolynomial.Funext instructions -9.1%
+ ~Mathlib.Data.MvPolynomial.Supported instructions -7.5%
+ ~Mathlib.Data.Polynomial.Monomial instructions -10.2%
+ ~Mathlib.FieldTheory.AbelRuffini instructions -12.6%
+ ~Mathlib.FieldTheory.Cardinality instructions -62.4%
+ ~Mathlib.FieldTheory.Finite.Polynomial instructions -7.4%
+ ~Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure instructions -24.2%
+ ~Mathlib.FieldTheory.MvPolynomial instructions -27.1%
+ ~Mathlib.FieldTheory.PolynomialGaloisGroup instructions -30.6%
+ ~Mathlib.FieldTheory.RatFunc instructions -5.1%
+ ~Mathlib.FieldTheory.SplittingField.Construction instructions -44.6%
+ ~Mathlib.LinearAlgebra.Matrix.Adjugate instructions -10.9%
+ ~Mathlib.LinearAlgebra.Matrix.MvPolynomial instructions -11.4%
+ ~Mathlib.NumberTheory.LegendreSymbol.AddCharacter instructions -25.5%
+ ~Mathlib.NumberTheory.LegendreSymbol.GaussSum instructions -25.3%
+ ~Mathlib.RepresentationTheory.Maschke instructions -10.0%
+ ~Mathlib.RingTheory.AlgebraicIndependent instructions -5.6%
+ ~Mathlib.RingTheory.FinitePresentation instructions -45.3%
+ ~Mathlib.RingTheory.FiniteType instructions -14.7%
+ ~Mathlib.RingTheory.Jacobson instructions -9.3%
+ ~Mathlib.RingTheory.MvPolynomial.Homogeneous instructions -9.5%
+ ~Mathlib.RingTheory.MvPolynomial.Ideal instructions -7.6%
+ ~Mathlib.RingTheory.MvPolynomial.WeightedHomogeneous instructions -5.1%
+ ~Mathlib.RingTheory.Nullstellensatz instructions -53.0%
+ ~Mathlib.RingTheory.Polynomial.Basic instructions -12.8%
+ ~Mathlib.RingTheory.Polynomial.GaussLemma instructions -8.2%
+ ~Mathlib.RingTheory.Polynomial.Quotient instructions -17.3%
+ ~Mathlib.RingTheory.RootsOfUnity.Minpoly instructions -36.3%
+ ~Mathlib.RingTheory.WittVector.Basic instructions -10.4%
+ ~Mathlib.RingTheory.WittVector.Defs instructions -14.4%
+ ~Mathlib.RingTheory.WittVector.Frobenius instructions -5.9%
+ ~Mathlib.RingTheory.WittVector.MulP instructions -8.2%
+ ~Mathlib.RingTheory.WittVector.StructurePolynomial instructions -8.3%
+ ~Mathlib.RingTheory.WittVector.Teichmuller instructions -30.0%
+ ~Mathlib.RingTheory.WittVector.WittPolynomial instructions -11.5% |
Contributor
Author
|
!bench |
Collaborator
|
Here are the benchmark results for commit 0d13ae5. Benchmark Metric Change
============================================================================
+ ~Mathlib.Algebra.Category.Ring.Adjunctions instructions -12.9%
+ ~Mathlib.Algebra.FreeNonUnitalNonAssocAlgebra instructions -11.9%
+ ~Mathlib.Algebra.Lie.Free instructions -5.6%
+ ~Mathlib.Algebra.MonoidAlgebra.Basic instructions -6.4%
+ ~Mathlib.Algebra.MonoidAlgebra.Grading instructions -17.7%
+ ~Mathlib.AlgebraicGeometry.EllipticCurve.Point instructions -9.8%
+ ~Mathlib.Data.MvPolynomial.Derivation instructions -6.6%
+ ~Mathlib.Data.MvPolynomial.Division instructions -8.1%
+ ~Mathlib.Data.MvPolynomial.Equiv instructions -6.4%
+ ~Mathlib.Data.MvPolynomial.Funext instructions -9.7%
+ ~Mathlib.Data.MvPolynomial.Supported instructions -7.5%
+ ~Mathlib.Data.Polynomial.Monomial instructions -10.6%
+ ~Mathlib.FieldTheory.AbelRuffini instructions -13.1%
+ ~Mathlib.FieldTheory.Cardinality instructions -63.1%
+ ~Mathlib.FieldTheory.Finite.Polynomial instructions -7.2%
+ ~Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure instructions -26.2%
+ ~Mathlib.FieldTheory.MvPolynomial instructions -29.3%
+ ~Mathlib.FieldTheory.PolynomialGaloisGroup instructions -31.7%
+ ~Mathlib.FieldTheory.RatFunc instructions -5.2%
+ ~Mathlib.FieldTheory.SplittingField.Construction instructions -46.3%
+ ~Mathlib.LinearAlgebra.Matrix.Adjugate instructions -11.9%
+ ~Mathlib.LinearAlgebra.Matrix.MvPolynomial instructions -11.5%
+ ~Mathlib.NumberTheory.LegendreSymbol.AddCharacter instructions -26.1%
+ ~Mathlib.NumberTheory.LegendreSymbol.GaussSum instructions -31.2%
+ ~Mathlib.RepresentationTheory.Maschke instructions -13.0%
+ ~Mathlib.RingTheory.AlgebraicIndependent instructions -5.7%
+ ~Mathlib.RingTheory.FinitePresentation instructions -46.2%
+ ~Mathlib.RingTheory.FiniteType instructions -16.6%
+ ~Mathlib.RingTheory.Jacobson instructions -10.0%
+ ~Mathlib.RingTheory.MvPolynomial.Homogeneous instructions -9.4%
+ ~Mathlib.RingTheory.MvPolynomial.Ideal instructions -7.6%
+ ~Mathlib.RingTheory.MvPolynomial.WeightedHomogeneous instructions -5.1%
+ ~Mathlib.RingTheory.Nullstellensatz instructions -59.7%
+ ~Mathlib.RingTheory.Polynomial.Basic instructions -13.3%
+ ~Mathlib.RingTheory.Polynomial.GaussLemma instructions -10.5%
+ ~Mathlib.RingTheory.Polynomial.Quotient instructions -18.7%
+ ~Mathlib.RingTheory.RootsOfUnity.Minpoly instructions -36.3%
+ ~Mathlib.RingTheory.WittVector.Basic instructions -11.9%
+ ~Mathlib.RingTheory.WittVector.Defs instructions -14.8%
+ ~Mathlib.RingTheory.WittVector.Frobenius instructions -5.7%
+ ~Mathlib.RingTheory.WittVector.MulP instructions -8.1%
+ ~Mathlib.RingTheory.WittVector.StructurePolynomial instructions -8.1%
+ ~Mathlib.RingTheory.WittVector.Teichmuller instructions -31.7%
+ ~Mathlib.RingTheory.WittVector.WittPolynomial instructions -11.4% |
Contributor
|
(Just a reminder that on the mathlib4 repo, if authors don't self-label with |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.