Skip to content

perf(Geometry): more small speed-ups#13459

Closed
grunweg wants to merge 15 commits intomasterfrom
MR-more-geometry-speedups-rfc
Closed

perf(Geometry): more small speed-ups#13459
grunweg wants to merge 15 commits intomasterfrom
MR-more-geometry-speedups-rfc

Conversation

@grunweg
Copy link
Copy Markdown
Contributor

@grunweg grunweg commented Jun 2, 2024

Small reductions in LeftInvariantDerivation (2%, 4,5 * 10⁹ instructions) and ContMDiff.Defs (2,5%, 1,5 * 10⁹ instructions).

Comments welcome if these are worth it.

Includes #13456.


Open in Gitpod

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Jun 2, 2024

!bench

To be discussed if this is actually beneficial, or more subtle than
I thought!
@grunweg grunweg force-pushed the MR-more-geometry-speedups-rfc branch from 27d3c67 to 1b79358 Compare June 2, 2024 12:48
@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit 27d3c67.
The entire run failed.
Found no significant differences.

grunweg added 2 commits June 2, 2024 17:11
- squeeze nlinarith calls (saves 1s each)
- squeeze simp (saves 0.5s)
- downgrade congr! to congr (saves ~0.1s)
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Jun 2, 2024

!bench

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit c5282de.
There were significant changes against commit 6f758e5:

  Benchmark                                                 Metric         Change
  ===============================================================================
+ ~Mathlib.Geometry.Manifold.Instances.Sphere               instructions   -30.5%
+ ~Mathlib.Geometry.Manifold.VectorBundle.FiberwiseLinear   instructions   -38.7%

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Jun 2, 2024

The changes in LeftInvariantDerivation do speed up the file, but very slightly (2-3%).

@grunweg grunweg changed the title RFC: more Geometry speed-up experiments perf(Geometry): more speed-up experiments Jun 2, 2024
@grunweg grunweg added the RFC Request for comment label Jun 2, 2024
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jun 3, 2024
@grunweg grunweg removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jun 3, 2024
@grunweg grunweg changed the title perf(Geometry): more speed-up experiments perf(Geometry): more small speed-ups Jun 4, 2024
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jun 10, 2024
@grunweg grunweg removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jun 10, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 10, 2024

PR summary 766a40b592

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ bar
+ foo
+ instAddMonoid
+ instCompleteSpace
+ instFiniteDimensional
+ instFoo
+ instOrthogonalProjection
+ instProperSpace
+ instZeroHomClass

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.

@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jul 19, 2024
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 12, 2024
@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 2, 2024
@grunweg grunweg closed this Feb 16, 2025
@YaelDillies YaelDillies deleted the MR-more-geometry-speedups-rfc branch August 15, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) RFC Request for comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants