-
Notifications
You must be signed in to change notification settings - Fork 465
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
perf: fix implementation of move constructors and move assignment ope… #4700
Conversation
…rators Right now those constructors result in a copy instead of the desired move. We've measured that expr copying and assignment by itself uses around 10% of total runtime on our workloads. See leanprover#4698 for details.
Mathlib CI status (docs):
|
Here are the benchmark results for commit c3c46b2. Benchmark Metric Change
==================================================
+ reduceMatch instructions -1.4% (-352.1 σ)
+ stdlib tactic execution -1.4% (-342.6 σ) |
Mathlib benchmark is hopefully running now at leanprover-community/mathlib4#14599. |
No significant changes in Mathlib build time. (This is, of course, not intended to be a representative benchmark!) |
@legrosbuffle I assume the time savings happen in kernel type checking in your case? While lean4 and mathlib4 are not bottlenecked by the kernel at the moment, we are still interested in optimizing it. Do you think you could extract a representative stand-alone test case for the bottleneck and speedup? |
Yes, the majority of the cost if from
It's not obvious that this is easy to reduce, but I'll see what I can do. |
…rators
Right now those constructors result in a copy instead of the desired move. We've measured that expr copying and assignment by itself uses around 10% of total runtime on our workloads.
See #4698 for details.