Skip to content

perf(CategoryTheory/Monoidal/Internal/Types): decrease instance priority#38046

Closed
JovanGerb wants to merge 1 commit intoleanprover-community:masterfrom
JovanGerb:Jovan-GrpObj-prio
Closed

perf(CategoryTheory/Monoidal/Internal/Types): decrease instance priority#38046
JovanGerb wants to merge 1 commit intoleanprover-community:masterfrom
JovanGerb:Jovan-GrpObj-prio

Conversation

@JovanGerb
Copy link
Copy Markdown
Contributor

This PR is a test to see if we can improve performance by decreasing the priority of some monoid/group instances coming from category theory.


Open in Gitpod

@JovanGerb JovanGerb added the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Apr 14, 2026
Copy link
Copy Markdown
Contributor Author

@JovanGerb JovanGerb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!bench

@github-actions
Copy link
Copy Markdown

PR summary 044631201f

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ instance (priority := 500) commGrpCommGroup (A : Type u) [GrpObj A] [IsCommMonObj A] :
+ instance (priority := 500) commMonCommMonoid (A : Type u) [MonObj A] [IsCommMonObj A] :
+ instance (priority := 500) grpGroup (A : Type u) [GrpObj A] : Group A
+ instance (priority := 500) monMonoid (A : Type u) [MonObj A] : Monoid A
- commGrpCommGroup
- commMonCommMonoid
- grpGroup
- monMonoid

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

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

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


No changes to technical debt.

You can run this locally as

./scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions bot added t-category-theory Category theory and removed awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. labels Apr 14, 2026
@JovanGerb
Copy link
Copy Markdown
Contributor Author

!bench

@leanprover-radar
Copy link
Copy Markdown

leanprover-radar commented Apr 14, 2026

Benchmark results for 3f75033 against 0446312 are in. No significant results found. @JovanGerb

  • 🟥 build//instructions: +12.8G (+0.01%)

Small changes (1✅)

  • build/module/Mathlib.Order.Synonym//instructions: -131.0M (-3.75%)

@JovanGerb
Copy link
Copy Markdown
Contributor Author

Seems to not do anything useful

@JovanGerb JovanGerb closed this Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-category-theory Category theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants