[Merged by Bors] - perf: fast_instance% in Mathlib.Order.Basic#39795
Closed
kbuzzard wants to merge 1 commit into
Closed
[Merged by Bors] - perf: fast_instance% in Mathlib.Order.Basic#39795kbuzzard wants to merge 1 commit into
kbuzzard wants to merge 1 commit into
Conversation
Member
Author
|
!radar |
|
Benchmark results for 48f2583 against 383a355 are in. No significant results found. @kbuzzard
Medium changes (1✅)
|
PR summary 48f25832fa
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Order.Basic | 114 | 115 | +1 (+0.88%) |
Import changes for all files
| Files | Import difference |
|---|---|
254 filesMathlib.Algebra.BigOperators.Group.List.Basic Mathlib.Algebra.BigOperators.Group.List.Lemmas Mathlib.Algebra.EuclideanDomain.Defs Mathlib.Algebra.EuclideanDomain.Field Mathlib.Algebra.EuclideanDomain.Int Mathlib.Algebra.FreeMonoid.FreeSemigroup Mathlib.Algebra.Group.Action.End Mathlib.Algebra.Group.Center Mathlib.Algebra.Group.Conj Mathlib.Algebra.Group.End Mathlib.Algebra.GroupWithZero.Action.Basic Mathlib.Algebra.GroupWithZero.Associated Mathlib.Algebra.GroupWithZero.Center Mathlib.Algebra.GroupWithZero.Conj Mathlib.Algebra.Order.AddGroupWithTop Mathlib.Algebra.Order.AddTorsor Mathlib.Algebra.Order.BigOperators.Group.List Mathlib.Algebra.Order.Group.Abs Mathlib.Algebra.Order.Group.Action.End Mathlib.Algebra.Order.Group.Action.Synonym Mathlib.Algebra.Order.Group.Basic Mathlib.Algebra.Order.Group.Defs Mathlib.Algebra.Order.Group.DenselyOrdered Mathlib.Algebra.Order.Group.End Mathlib.Algebra.Order.Group.Equiv Mathlib.Algebra.Order.Group.Int Mathlib.Algebra.Order.Group.Lattice Mathlib.Algebra.Order.Group.MinMax Mathlib.Algebra.Order.Group.Nat Mathlib.Algebra.Order.Group.Opposite Mathlib.Algebra.Order.Group.OrderIso Mathlib.Algebra.Order.Group.PosPart Mathlib.Algebra.Order.Group.Synonym Mathlib.Algebra.Order.Group.Unbundled.Abs Mathlib.Algebra.Order.Group.Unbundled.Basic Mathlib.Algebra.Order.Group.Unbundled.Int Mathlib.Algebra.Order.Group.Units Mathlib.Algebra.Order.GroupWithZero.Action.Synonym Mathlib.Algebra.Order.GroupWithZero.Synonym Mathlib.Algebra.Order.GroupWithZero.Unbundled.Defs Mathlib.Algebra.Order.Hom.Basic Mathlib.Algebra.Order.Hom.Monoid Mathlib.Algebra.Order.Hom.TypeTags Mathlib.Algebra.Order.Hom.Units Mathlib.Algebra.Order.IsBotOne Mathlib.Algebra.Order.Module.Synonym Mathlib.Algebra.Order.Monoid.Associated Mathlib.Algebra.Order.Monoid.Basic Mathlib.Algebra.Order.Monoid.Canonical.Defs Mathlib.Algebra.Order.Monoid.Defs Mathlib.Algebra.Order.Monoid.NatCast Mathlib.Algebra.Order.Monoid.OrderDual Mathlib.Algebra.Order.Monoid.TypeTags Mathlib.Algebra.Order.Monoid.Unbundled.Basic Mathlib.Algebra.Order.Monoid.Unbundled.Defs Mathlib.Algebra.Order.Monoid.Unbundled.ExistsOfLE Mathlib.Algebra.Order.Monoid.Unbundled.MinMax Mathlib.Algebra.Order.Monoid.Unbundled.OrderDual Mathlib.Algebra.Order.Monoid.Unbundled.Pow Mathlib.Algebra.Order.Monoid.Unbundled.TypeTags Mathlib.Algebra.Order.Monoid.Unbundled.Units Mathlib.Algebra.Order.Monoid.Unbundled.WithTop Mathlib.Algebra.Order.Monoid.Units Mathlib.Algebra.Order.Monoid.WithTop Mathlib.Algebra.Order.PUnit Mathlib.Algebra.Order.Ring.Idempotent Mathlib.Algebra.Order.Ring.Synonym Mathlib.Algebra.Order.Ring.Unbundled.Rat Mathlib.Algebra.Order.Sub.Basic Mathlib.Algebra.Order.Sub.Defs Mathlib.Algebra.Order.Sub.Prod Mathlib.Algebra.Order.Sub.Unbundled.Basic Mathlib.Algebra.Order.Sub.WithTop Mathlib.Algebra.Order.Sum Mathlib.Algebra.Order.ZeroLEOne Mathlib.Algebra.Prime.Lemmas Mathlib.Algebra.Ring.Centralizer Mathlib.Algebra.Tropical.Basic Mathlib.AlgebraicTopology.DoldKan.Compatibility Mathlib.CategoryTheory.Bicategory.End Mathlib.CategoryTheory.Bicategory.EqToHom Mathlib.CategoryTheory.Bicategory.Functor.Prelax Mathlib.CategoryTheory.Bicategory.LocallyDiscrete Mathlib.CategoryTheory.Bicategory.Opposites Mathlib.CategoryTheory.Bicategory.Strict.Basic Mathlib.CategoryTheory.CatCommSq Mathlib.CategoryTheory.Category.Preorder Mathlib.CategoryTheory.Category.ULift Mathlib.CategoryTheory.CommSq Mathlib.CategoryTheory.Comma.Arrow Mathlib.CategoryTheory.Comma.Basic Mathlib.CategoryTheory.Comma.CatCommSq Mathlib.CategoryTheory.ConcreteCategory.Basic Mathlib.CategoryTheory.DinatTrans Mathlib.CategoryTheory.Discrete.Basic Mathlib.CategoryTheory.Discrete.SumsProducts Mathlib.CategoryTheory.Elementwise Mathlib.CategoryTheory.EqToHom Mathlib.CategoryTheory.Equivalence Mathlib.CategoryTheory.EssentialImage Mathlib.CategoryTheory.FiberedCategory.BasedCategory Mathlib.CategoryTheory.FiberedCategory.Cartesian Mathlib.CategoryTheory.FiberedCategory.Cocartesian Mathlib.CategoryTheory.FiberedCategory.Fiber Mathlib.CategoryTheory.FiberedCategory.Fibered Mathlib.CategoryTheory.FiberedCategory.HasFibers Mathlib.CategoryTheory.FiberedCategory.HomLift Mathlib.CategoryTheory.Functor.Const Mathlib.CategoryTheory.Functor.CurryingThree Mathlib.CategoryTheory.Functor.Currying Mathlib.CategoryTheory.Functor.OfSequence Mathlib.CategoryTheory.Functor.TwoSquare Mathlib.CategoryTheory.Join.Basic Mathlib.CategoryTheory.Join.Opposites Mathlib.CategoryTheory.Join.Sum Mathlib.CategoryTheory.Limits.Shapes.Pullback.Categorical.Basic Mathlib.CategoryTheory.Limits.Shapes.Pullback.Categorical.CatCospanTransform Mathlib.CategoryTheory.Monoidal.Action.Basic Mathlib.CategoryTheory.Monoidal.Action.LinearFunctor Mathlib.CategoryTheory.Monoidal.Category Mathlib.CategoryTheory.Monoidal.CoherenceLemmas Mathlib.CategoryTheory.ObjectProperty.Basic Mathlib.CategoryTheory.ObjectProperty.ClosedUnderIsomorphisms Mathlib.CategoryTheory.ObjectProperty.Equivalence Mathlib.CategoryTheory.ObjectProperty.FullSubcategory Mathlib.CategoryTheory.Opposites Mathlib.CategoryTheory.PEmpty Mathlib.CategoryTheory.PUnit Mathlib.CategoryTheory.Pi.Basic Mathlib.CategoryTheory.Products.Associator Mathlib.CategoryTheory.Products.Basic Mathlib.CategoryTheory.Products.Bifunctor Mathlib.CategoryTheory.Products.Unitor Mathlib.CategoryTheory.Square Mathlib.CategoryTheory.Sums.Associator Mathlib.CategoryTheory.Sums.Basic Mathlib.CategoryTheory.Sums.Products Mathlib.Combinatorics.Quiver.Path.Decomposition Mathlib.Combinatorics.Quiver.Path.Vertices Mathlib.Computability.Tape Mathlib.Computability.TuringMachine.Tape Mathlib.Control.Fix Mathlib.Data.Bool.Set Mathlib.Data.Bundle Mathlib.Data.Fin.Basic Mathlib.Data.FunLike.Graded Mathlib.Data.Int.GCD Mathlib.Data.Int.LeastGreatest Mathlib.Data.Int.Range Mathlib.Data.List.Chain Mathlib.Data.List.Destutter Mathlib.Data.List.DropRight Mathlib.Data.List.Infix Mathlib.Data.List.Intervals Mathlib.Data.List.Iterate Mathlib.Data.List.Lex Mathlib.Data.List.MinMax Mathlib.Data.List.Permutation Mathlib.Data.List.Prime Mathlib.Data.List.Range Mathlib.Data.List.Rotate Mathlib.Data.List.SplitBy Mathlib.Data.List.SplitLengths Mathlib.Data.List.Sublists Mathlib.Data.List.TakeWhile Mathlib.Data.Multiset.AddSub Mathlib.Data.Multiset.Basic Mathlib.Data.Multiset.Count Mathlib.Data.Multiset.Defs Mathlib.Data.Multiset.Pairwise Mathlib.Data.Multiset.Replicate Mathlib.Data.Multiset.ZeroCons Mathlib.Data.Nat.Cast.Synonym Mathlib.Data.Nat.Cast.WithTop Mathlib.Data.Nat.Choose.Basic Mathlib.Data.Nat.GCD.Prime Mathlib.Data.Nat.Log Mathlib.Data.Nat.Order.Lemmas Mathlib.Data.Nat.Prime.Defs Mathlib.Data.Nat.Upto Mathlib.Data.Nat.WithBot Mathlib.Data.Ordmap.Ordnode Mathlib.Data.PEquiv Mathlib.Data.PNat.Defs Mathlib.Data.PNat.Equiv Mathlib.Data.PSigma.Order Mathlib.Data.Part Mathlib.Data.Rat.Defs Mathlib.Data.Set.Basic Mathlib.Data.Set.Disjoint Mathlib.Data.Set.Enumerate Mathlib.Data.Set.Inclusion Mathlib.Data.Set.Insert Mathlib.Data.Set.Order Mathlib.Data.Set.Subsingleton Mathlib.Data.SetLike.Basic Mathlib.Data.Sigma.Order Mathlib.Data.String.Basic Mathlib.Data.Sum.Lattice Mathlib.Data.Sum.Order Mathlib.InformationTheory.Coding.UniquelyDecodable Mathlib.Logic.Function.FiberPartition Mathlib.Order.Antisymmetrization Mathlib.Order.Basic Mathlib.Order.BooleanAlgebra.Basic Mathlib.Order.BooleanAlgebra.Defs Mathlib.Order.Booleanisation Mathlib.Order.BoundedOrder.Basic Mathlib.Order.BoundedOrder.Lattice Mathlib.Order.BoundedOrder.Monotone Mathlib.Order.Circular Mathlib.Order.Comparable Mathlib.Order.Compare Mathlib.Order.Disjoint Mathlib.Order.GaloisConnection.Defs Mathlib.Order.Heyting.Basic Mathlib.Order.Heyting.Boundary Mathlib.Order.Heyting.Hom Mathlib.Order.Hom.Basic Mathlib.Order.Hom.BoundedLattice Mathlib.Order.Hom.Bounded Mathlib.Order.Hom.Lattice Mathlib.Order.Hom.WithTopBot Mathlib.Order.Iterate Mathlib.Order.Lattice Mathlib.Order.Lex Mathlib.Order.Max Mathlib.Order.MinMax Mathlib.Order.Monotone.Basic Mathlib.Order.Monotone.Defs Mathlib.Order.Monotone.Monovary Mathlib.Order.Nat Mathlib.Order.OrderDual Mathlib.Order.Part Mathlib.Order.PropInstances Mathlib.Order.RelClasses Mathlib.Order.RelIso.Basic Mathlib.Order.SetIsMax Mathlib.Order.SymmDiff Mathlib.Order.Synonym Mathlib.Order.Types.Defs Mathlib.Order.ULift Mathlib.Order.WithBotTop Mathlib.Order.WithBot Mathlib.SetTheory.Lists Mathlib.Tactic.ApplyFun Mathlib.Tactic.CategoryTheory.Elementwise Mathlib.Tactic.CategoryTheory.Monoidal.Basic Mathlib.Tactic.CategoryTheory.Monoidal.Datatypes Mathlib.Tactic.CategoryTheory.Monoidal.Normalize Mathlib.Tactic.CategoryTheory.Monoidal.PureCoherence Mathlib.Tactic.CategoryTheory.MonoidalComp Mathlib.Tactic.Widget.StringDiagram Mathlib.Tactic.Zify |
1 |
Declarations diff
No declarations were harmed in the making of this PR! 🐙
You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.
No changes to strong technical debt.
No changes to weak technical debt.
Member
|
Thanks! bors merge |
mathlib-bors Bot
pushed a commit
that referenced
this pull request
May 25, 2026
This PR adds some `fast_instance%` to tidy up some instance terms. We get a speedup in `Mathlib.Topology.Algebra.Valued.WithVal`.
Contributor
|
Pull request successfully merged into master. Build succeeded: |
riccardobrasca
added a commit
to riccardobrasca/mathlib4
that referenced
this pull request
May 27, 2026
This PR adds some `fast_instance%` to tidy up some instance terms. We get a speedup in `Mathlib.Topology.Algebra.Valued.WithVal`. --- <!-- Your PR title will become the first line of the commit message. In this box, the text above the `---` (if not empty) will be appended to the commit message, and can be used to give additional context or details. Please leave a blank newline before the `---`, otherwise GitHub will format the text above it as a title. For details on the "pull request lifecycle" in mathlib, please see: https://leanprover-community.github.io/contribute/index.html In particular, note that most reviewers will only notice your PR if it passes the continuous integration checks. Please ask for help on https://leanprover.zulipchat.com if needed. When merging, all the commits will be squashed into a single commit listing all co-authors. Co-authors in the squash commit are gathered from two sources: First, all authors of commits to this PR branch are included. Thus, one way to add co-authors is to include at least one commit authored by each co-author among the commits in the pull request. If necessary, you may create empty commits to indicate co-authorship, using commands like so: git commit --author="Author Name <author@email.com>" --allow-empty -m "add Author Name as coauthor" Second, co-authors can also be listed in lines at the very bottom of the commit message (that is, directly before the `---`) using the following format: Co-authored-by: Author Name <author@email.com> If you are moving or deleting declarations, please include these lines at the bottom of the commit message (before the `---`, and also before any "Co-authored-by" lines) using the following format: Moves: - Vector.* -> List.Vector.* - ... Deletions: - Nat.bit1_add_bit1 - ... Any other comments you want to keep out of the PR commit should go below the `---`, and placed outside this HTML comment, or else they will be invisible to reviewers. If this PR depends on other PRs, please list them below this comment, using the following format: - [ ] depends on: #abc [optional extra text] - [ ] depends on: #xyz [optional extra text] --> [](https://gitpod.io/from-referrer/)
b-mehta
pushed a commit
to b-mehta/mathlib4
that referenced
this pull request
Jun 2, 2026
This PR adds some `fast_instance%` to tidy up some instance terms. We get a speedup in `Mathlib.Topology.Algebra.Valued.WithVal`.
Bergschaf
pushed a commit
to Bergschaf/mathlib4
that referenced
this pull request
Jun 3, 2026
This PR adds some `fast_instance%` to tidy up some instance terms. We get a speedup in `Mathlib.Topology.Algebra.Valued.WithVal`.
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.
This PR adds some
fast_instance%to tidy up some instance terms. We get a speedup inMathlib.Topology.Algebra.Valued.WithVal.The genesis of this PR is #39780 (scattergun fast_instance%) which when benchmarked here #39780 (comment) didn't do much in general, but did save over 10% off
Mathlib.Topology.Algebra.Valued.WithVal. This PR reverse-engineers which change caused that speedup, and makes only that change. The change looks sensible to me.