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

[Merged by Bors] - perf: speedup using Submodule.restrictScalars_mem instead of relying on defeq #19711

Closed
wants to merge 2 commits into from

Conversation

alreadydone
Copy link
Contributor


Open in Gitpod

@alreadydone alreadydone added the t-algebra Algebra (groups, rings, fields, etc) label Dec 3, 2024
@alreadydone
Copy link
Contributor Author

!bench

Copy link

github-actions bot commented Dec 3, 2024

PR summary 407b6bffc3

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

No declarations were harmed in the making of this PR! 🐙

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.


No changes to technical debt.

You can run this locally as

./scripts/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).

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit 407b6bf.
There were significant changes against commit da9df8d:

  Benchmark                             Metric         Change
  ===========================================================
+ ~Mathlib.RingTheory.Ideal.Cotangent   instructions   -21.6%
+ ~Mathlib.RingTheory.Kaehler.Basic     instructions    -6.2%

@alreadydone
Copy link
Contributor Author

These two occurences were discovered because they timed out in another PR; maybe more are still hidden. Not sure who might know about more situations that could benefit from this. Maybe @erdOne?

@alreadydone alreadydone added the easy < 20s of review time. See the lifecycle page for guidelines. label Dec 4, 2024
@erdOne
Copy link
Member

erdOne commented Dec 4, 2024

I feel like this defeq abuse(?) happen very often (and I'm definitely guilty of many of them) that I unfortunately cannot give you a list of where it occurs.

@riccardobrasca
Copy link
Member

This looks like a positive change, thanks!

bors merge

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the ready-to-merge This PR has been sent to bors. label Dec 4, 2024
mathlib-bors bot pushed a commit that referenced this pull request Dec 4, 2024
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Dec 4, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title perf: speedup using Submodule.restrictScalars_mem instead of relying on defeq [Merged by Bors] - perf: speedup using Submodule.restrictScalars_mem instead of relying on defeq Dec 4, 2024
@mathlib-bors mathlib-bors bot closed this Dec 4, 2024
@mathlib-bors mathlib-bors bot deleted the restrictScalars_speedup branch December 4, 2024 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy < 20s of review time. See the lifecycle page for guidelines. ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants