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

Slow type-class search for has_add (α → β) #3080

Closed
gebner opened this issue Jun 15, 2020 · 1 comment
Closed

Slow type-class search for has_add (α → β) #3080

gebner opened this issue Jun 15, 2020 · 1 comment

Comments

@gebner
Copy link
Member

gebner commented Jun 15, 2020

Linting takes half an hour at the moment. A large part of this runtime is spent in type-class search in the simp_nf linter. (For example, simplifying the left-hand side of pfun.coe_val takes 3.6 seconds.)

One particularly slow type-class problem that pops up is has_add (α → β):

import all
set_option profiler true
example {α : Type*} {β : Type*} : has_add (α → β) :=
by apply_instance -- 3.3s on my machine
@gebner gebner changed the title Performance issues in type-class search Performance issues in type-class search for has_add (α → β) Jun 15, 2020
@gebner gebner changed the title Performance issues in type-class search for has_add (α → β) Slow type-class search for has_add (α → β) Jun 15, 2020
@gebner
Copy link
Member Author

gebner commented Jun 15, 2020

Fixed by leanprover-community/lean#332

@gebner gebner closed this as completed Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant