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
#17984 can cause significant slowdown when the context contains many assumptions of the form 0 <= ... < ... #18770
Comments
This example might be worth adding to https://github.com/coq-community/coq-performance-tests. If moving |
I created a PR for adding the example to coq-performace-tests here: coq-community/coq-performance-tests#42 |
Plausibly the |
I would think that putting the destruct at the beginning would make sense as it seems like a cheap operation, but I don't have a good intuition for what the most efficient order is. |
What is the status of using Ltac2 in the standard library/standard plugins like zify? This would be a prime example of code that I would replace with Ltac2 without thinking about it twice. Collect everything that needs clearing, everything that needs specializing, everything that needs destructing, perform the operations in that order (and batch the clearing operations if the API allows that), rinse, repeat. |
I think that this question is very much related to the ongoing discussion about the split of the stdlib from the Coq core itself. |
Fixes coq#18770 We first destruct, then clear, then specialize. The reasoning is: - `destruct` before `clear` because the `clear` is not going to make much of a difference to `destruct`, but the `destruct` might expose more opportunities for `clear`ing - `clear` between `destruct` and `specialize` so that we don't waste a bunch of time modifying the goal (via `specialize`) on hypotheses that we would anyway want to `clear`
Description of the problem
The change in #17984 can cause significant slowdown when the context contains many assumptions of the form
0 <= ... < ...
. See the Coq file below for an example. This can maybe be resolved by moving the destruct the the beginning ofZ.euclidean_division_equations_cleanup
.Small Coq file to reproduce the bug
Version of Coq where this bug occurs
8.19.0
Last version of Coq where the bug did not occur
8.18
The text was updated successfully, but these errors were encountered: