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: Data.Sign #2957

Closed
wants to merge 1 commit into from
Closed

[Merged by Bors] - perf: Data.Sign #2957

wants to merge 1 commit into from

Conversation

digama0
Copy link
Member

@digama0 digama0 commented Mar 17, 2023

This single file uses more than twice as much RAM as the next largest file in mathlib, see https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/mathlib4.20speedcenter/near/342595677. A simple out-lining fixes the issue.


Open in Gitpod

@digama0
Copy link
Member Author

digama0 commented Mar 17, 2023

!bench

@eric-wieser
Copy link
Member

Any idea why? Is it unable to parallelize between fields? Does using the async tactic (if that still exist) allow it to remain inlined?

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit 529fcfa.
There were significant changes against commit 5163d8c:

  Benchmark   Metric        Change
  ================================
+ build       compilation   -10.5%
+ build       maxrss        -54.6%
- build       norm_num        6.6%

@digama0
Copy link
Member Author

digama0 commented Mar 17, 2023

@eric-wieser The abstract tactic would be perfect for this but it hasn't been ported. (I have some abortive work on that tactic in a local branch.) Nothing about this is parallelized, and that's not the issue. Something about the structure of the definition triggers the old compiler to have some weird behavior, I'm not sure exactly what but it might be lifting the match statements and making 27 * 9 copies of the instance itself. It's the old compiler so it isn't likely to be fixed, hence the workaround.

@ChrisHughes24
Copy link
Member

bors r+

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Mar 23, 2023
bors bot pushed a commit that referenced this pull request Mar 23, 2023
This single file uses more than twice as much RAM as the next largest file in mathlib, see https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/mathlib4.20speedcenter/near/342595677. A simple out-lining fixes the issue.
@bors
Copy link

bors bot commented Mar 23, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title perf: Data.Sign [Merged by Bors] - perf: Data.Sign Mar 23, 2023
@bors bors bot closed this Mar 23, 2023
@bors bors bot deleted the perf_data_sign branch March 23, 2023 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has been sent to bors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants