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

perf: make Mul.toSMul higher priority #18294

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

FR-vdash-bot
Copy link
Collaborator


Open in Gitpod

@FR-vdash-bot FR-vdash-bot added t-algebra Algebra (groups, rings, fields, etc) awaiting-bench labels Oct 27, 2024
Copy link

github-actions bot commented Oct 27, 2024

PR summary bcc8c0a0b7

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Algebra.Order.Field.Pointwise 413 399 -14 (-3.39%)
Mathlib.Combinatorics.Additive.AP.Three.Defs 642 637 -5 (-0.78%)
Mathlib.Topology.Algebra.Module.WeakBilin 885 884 -1 (-0.11%)
Import changes for all files
Files Import difference
Mathlib.Algebra.Order.Field.Pointwise -14
Mathlib.Combinatorics.Additive.AP.Three.Defs -5
Mathlib.Topology.Algebra.Module.WeakBilin -1

Declarations diff

+ instance (priority := 2000) Mul.toSMul (α : Type*) [Mul α] : SMul α α := ⟨(· * ·)⟩
- instance (priority := 910) Mul.toSMul (α : Type*) [Mul α] : SMul α α := ⟨(· * ·)⟩

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.

@FR-vdash-bot
Copy link
Collaborator Author

!bench

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit bcc8c0a.
There were significant changes against commit 8c2c97e:

  Benchmark                                                               Metric         Change
  =============================================================================================
+ ~Mathlib.Algebra.DualNumber                                             instructions   -24.9%
+ ~Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.NonUnital   instructions    -5.2%
+ ~Mathlib.LinearAlgebra.Dual                                             instructions    -3.3%
+ ~Mathlib.RingTheory.Kaehler.Basic                                       instructions    -3.7%
- ~Mathlib.RingTheory.Kaehler.Polynomial                                  instructions   378.9%
+ ~Mathlib.RingTheory.Kaehler.TensorProduct                               instructions    -5.9%

Copy link

File Instructions %
build +181.296⬝10⁹ (+0.13%)
lint -9.288⬝10⁹ (-0.14%)
Mathlib.RingTheory.Kaehler.Polynomial +557.535⬝10⁹ (+378.87%)
Mathlib.RingTheory.AdicCompletion.AsTensorProduct +8.45⬝10⁹ (+4.56%)
Mathlib.RingTheory.AdicCompletion.Algebra +4.887⬝10⁹ (+8.3%)
2 files, Instructions +3.0⬝10⁹
File Instructions %
Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict +3.366⬝10⁹ (+2.69%)
Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Unique +3.66⬝10⁹ (+1.46%)
File Instructions %
Mathlib.Algebra.GroupWithZero.Pointwise.Finset +2.969⬝10⁹ (+3.75%)
3 files, Instructions +1.0⬝10⁹
File Instructions %
Mathlib.FieldTheory.RatFunc.Basic +1.147⬝10⁹ (+0.48%)
Mathlib.Topology.Algebra.Module.WeakDual +1.48⬝10⁹ (+4.59%)
Mathlib.MeasureTheory.Measure.FiniteMeasure +1.21⬝10⁹ (+1.34%)
46 files, Instructions -2.0⬝10⁹
File Instructions %
Mathlib.Algebra.Module.LinearMap.Polynomial -1.31⬝10⁹ (-1.7%)
Mathlib.GroupTheory.GroupAction.ConjAct -1.51⬝10⁹ (-5.6%)
Mathlib.Analysis.Normed.Algebra.Basic -1.55⬝10⁹ (-8.53%)
Mathlib.Analysis.Calculus.Gradient.Basic -1.67⬝10⁹ (-2.3%)
Mathlib.GroupTheory.GroupAction.SubMulAction.Pointwise -1.117⬝10⁹ (-11.61%)
Mathlib.LinearAlgebra.QuadraticForm.Basic -1.134⬝10⁹ (-0.62%)
Mathlib.RingTheory.IntegralClosure.IntegralRestrict -1.152⬝10⁹ (-0.47%)
Mathlib.MeasureTheory.Group.Defs -1.152⬝10⁹ (-18.59%)
Mathlib.Analysis.InnerProductSpace.Dual -1.191⬝10⁹ (-2.72%)
Mathlib.AlgebraicGeometry.PrimeSpectrum.TensorProduct -1.192⬝10⁹ (-6.30%)
Mathlib.RingTheory.Unramified.Field -1.197⬝10⁹ (-1.76%)
Mathlib.Algebra.Module.LocalizedModule -1.200⬝10⁹ (-0.59%)
Mathlib.LinearAlgebra.Matrix.BilinearForm -1.205⬝10⁹ (-1.78%)
Mathlib.MeasureTheory.Group.AddCircle -1.207⬝10⁹ (-5.66%)
Mathlib.Algebra.Lie.Weights.RootSystem -1.250⬝10⁹ (-0.76%)
Mathlib.LinearAlgebra.Contraction -1.263⬝10⁹ (-1.88%)
Mathlib.RingTheory.Generators -1.268⬝10⁹ (-0.93%)
Mathlib.NumberTheory.NumberField.CanonicalEmbedding.Basic -1.284⬝10⁹ (-0.69%)
Mathlib.RingTheory.IsTensorProduct -1.295⬝10⁹ (-1.32%)
Mathlib.Analysis.Complex.UnitDisc.Basic -1.331⬝10⁹ (-7.20%)
Mathlib.Analysis.Normed.Algebra.Spectrum -1.371⬝10⁹ (-0.99%)
Mathlib.MeasureTheory.Decomposition.Lebesgue -1.385⬝10⁹ (-2.3%)
Mathlib.FieldTheory.Adjoin -1.392⬝10⁹ (-0.50%)
Mathlib.MeasureTheory.Measure.EverywherePos -1.420⬝10⁹ (-5.79%)
Mathlib.RingTheory.Congruence.Basic -1.463⬝10⁹ (-6.28%)
Mathlib.LinearAlgebra.Matrix.SesquilinearForm -1.475⬝10⁹ (-1.13%)
Mathlib.Analysis.InnerProductSpace.Adjoint -1.488⬝10⁹ (-0.69%)
Mathlib.RingTheory.MatrixAlgebra -1.494⬝10⁹ (-5.21%)
Mathlib.RingTheory.TensorProduct.MvPolynomial -1.501⬝10⁹ (-1.84%)
Mathlib.LinearAlgebra.Trace -1.506⬝10⁹ (-1.96%)
Mathlib.Algebra.Regular.SMul -1.515⬝10⁹ (-19.47%)
Mathlib.Topology.ContinuousMap.CompactlySupported -1.568⬝10⁹ (-3.84%)
Mathlib.LinearAlgebra.PerfectPairing -1.575⬝10⁹ (-3.78%)
Mathlib.RingTheory.PiTensorProduct -1.589⬝10⁹ (-2.9%)
Mathlib.Combinatorics.Additive.ETransform -1.597⬝10⁹ (-14.51%)
Mathlib.RingTheory.Presentation -1.606⬝10⁹ (-2.34%)
Mathlib.Analysis.NormedSpace.BallAction -1.611⬝10⁹ (-2.31%)
Mathlib.RingTheory.Smooth.Kaehler -1.622⬝10⁹ (-2.31%)
Mathlib.LinearAlgebra.BilinearForm.TensorProduct -1.627⬝10⁹ (-3.89%)
Mathlib.Topology.ContinuousMap.StoneWeierstrass -1.696⬝10⁹ (-0.81%)
Mathlib.Algebra.Order.UpperLower -1.727⬝10⁹ (-10.90%)
Mathlib.Analysis.Normed.Module.Dual -1.765⬝10⁹ (-3.7%)
Mathlib.LinearAlgebra.Orientation -1.774⬝10⁹ (-2.26%)
Mathlib.Algebra.Lie.TraceForm -1.776⬝10⁹ (-0.93%)
Mathlib.Data.Set.Pointwise.SMul -1.871⬝10⁹ (-4.84%)
Mathlib.LinearAlgebra.CliffordAlgebra.Contraction -1.929⬝10⁹ (-1.66%)
21 files, Instructions -3.0⬝10⁹
File Instructions %
Mathlib.Algebra.MonoidAlgebra.Defs -2.2⬝10⁹ (-2.20%)
Mathlib.RingTheory.SurjectiveOnStalks -2.4⬝10⁹ (-6.29%)
Mathlib.Algebra.Category.Grp.EpiMono -2.27⬝10⁹ (-6.16%)
Mathlib.Analysis.NormedSpace.OperatorNorm.Mul -2.62⬝10⁹ (-3.59%)
Mathlib.GroupTheory.Coset.Basic -2.76⬝10⁹ (-3.93%)
Mathlib.NumberTheory.WellApproximable -2.93⬝10⁹ (-6.77%)
Mathlib.Algebra.Algebra.Subalgebra.Unitization -2.107⬝10⁹ (-2.90%)
Mathlib.Algebra.Algebra.Quasispectrum -2.131⬝10⁹ (-3.10%)
Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv -2.160⬝10⁹ (-1.54%)
Mathlib.LinearAlgebra.QuadraticForm.TensorProduct.Isometries -2.174⬝10⁹ (-2.77%)
Mathlib.Topology.Algebra.Monoid -2.180⬝10⁹ (-5.69%)
Mathlib.LinearAlgebra.QuadraticForm.TensorProduct -2.232⬝10⁹ (-2.40%)
Mathlib.Geometry.Manifold.Algebra.LeftInvariantDerivation -2.259⬝10⁹ (-1.37%)
Mathlib.Algebra.Group.Pointwise.Finset.Basic -2.316⬝10⁹ (-2.79%)
Mathlib.Analysis.Calculus.FDeriv.Mul -2.388⬝10⁹ (-0.60%)
Mathlib.Analysis.SpecialFunctions.Pow.Deriv -2.524⬝10⁹ (-1.64%)
Mathlib.Data.Matrix.Basic -2.579⬝10⁹ (-2.8%)
Mathlib.Algebra.Star.NonUnitalSubalgebra -2.581⬝10⁹ (-1.67%)
Mathlib.Analysis.Normed.Group.Pointwise -2.685⬝10⁹ (-11.73%)
Mathlib.Analysis.CStarAlgebra.Unitization -2.705⬝10⁹ (-5.10%)
Mathlib.Algebra.DirectSum.Algebra -2.853⬝10⁹ (-15.93%)
12 files, Instructions -4.0⬝10⁹
File Instructions %
Mathlib.LinearAlgebra.CliffordAlgebra.BaseChange -3.132⬝10⁹ (-4.5%)
Mathlib.Algebra.Algebra.Unitization -3.379⬝10⁹ (-3.42%)
Mathlib.Algebra.Order.Module.Defs -3.390⬝10⁹ (-4.10%)
Mathlib.Algebra.Lie.Weights.Killing -3.460⬝10⁹ (-1.68%)
Mathlib.RingTheory.Kaehler.CotangentComplex -3.496⬝10⁹ (-1.50%)
Mathlib.Topology.Algebra.Group.Basic -3.516⬝10⁹ (-3.92%)
Mathlib.LinearAlgebra.TensorProduct.Graded.External -3.577⬝10⁹ (-2.24%)
Mathlib.MeasureTheory.Group.Measure -3.602⬝10⁹ (-6.88%)
Mathlib.Algebra.Lie.BaseChange -3.669⬝10⁹ (-4.54%)
Mathlib.MeasureTheory.Measure.Haar.Unique -3.682⬝10⁹ (-5.0%)
Mathlib.Analysis.Fourier.FourierTransformDeriv -3.769⬝10⁹ (-0.90%)
Mathlib.Algebra.DualQuaternion -3.783⬝10⁹ (-7.58%)
6 files, Instructions -5.0⬝10⁹
File Instructions %
Mathlib.RingTheory.Unramified.Finite -4.91⬝10⁹ (-4.41%)
Mathlib.Topology.ContinuousMap.Bounded -4.148⬝10⁹ (-4.9%)
Mathlib.Analysis.SpecialFunctions.ContinuousFunctionalCalculus.Rpow -4.279⬝10⁹ (-2.29%)
Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Instances -4.315⬝10⁹ (-1.36%)
Mathlib.Analysis.Normed.Algebra.Unitization -4.391⬝10⁹ (-7.20%)
Mathlib.Analysis.InnerProductSpace.Basic -4.464⬝10⁹ (-1.46%)
2 files, Instructions -6.0⬝10⁹
File Instructions %
Mathlib.RepresentationTheory.GroupCohomology.Resolution -5.510⬝10⁹ (-3.67%)
Mathlib.RingTheory.TensorProduct.Basic -5.745⬝10⁹ (-2.13%)
2 files, Instructions -7.0⬝10⁹
File Instructions %
Mathlib.GroupTheory.CosetCover -6.28⬝10⁹ (-8.42%)
Mathlib.Analysis.Normed.Module.WeakDual -6.843⬝10⁹ (-15.34%)
2 files, Instructions -9.0⬝10⁹
File Instructions %
Mathlib.Topology.ContinuousMap.Algebra -8.208⬝10⁹ (-7.49%)
Mathlib.Analysis.CStarAlgebra.Multiplier -8.835⬝10⁹ (-5.36%)
File Instructions %
Mathlib.Topology.MetricSpace.IsometricSMul -9.989⬝10⁹ (-22.48%)
3 files, Instructions -12.0⬝10⁹
File Instructions %
Mathlib.RingTheory.Kaehler.TensorProduct -11.148⬝10⁹ (-5.87%)
Mathlib.Algebra.DualNumber -11.454⬝10⁹ (-24.93%)
Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.NonUnital -11.566⬝10⁹ (-5.15%)
File Instructions %
Mathlib.RingTheory.Kaehler.Basic -12.578⬝10⁹ (-3.74%)
Mathlib.LinearAlgebra.Dual -13.253⬝10⁹ (-3.25%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-bench t-algebra Algebra (groups, rings, fields, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants