isDefEq cache for terms not containing metavariables.#2644
isDefEq cache for terms not containing metavariables.#2644leodemoura merged 7 commits intomasterfrom
Conversation
|
!bench |
a0ba45c to
8ba8496
Compare
|
!bench |
|
Here are the benchmark results for commit a0ba45c. Benchmark Metric Change
===================================================
+ lake build clean branch-misses -2.5% (-36.0 σ) |
|
Here are the benchmark results for commit 8ba8496. Benchmark Metric Change
======================================================
+ lake build clean branch-misses -2.5% (-23.8 σ)
+ stdlib tactic execution -7.5% (-23.1 σ) |
|
|
Unfortunately the Mathlib test: is now taking forever! This test was introduced in leanprover-community/mathlib4#5740. |
|
@semorrison Hmm, this at least seems fine on my machine? |
|
Oh, dear! This test has been failing for a while on Apple Silicon (which we don't test in CI). It's not relevant to this PR. |
|
!bench |
|
Here are the benchmark results for commit 5afb7a5. Benchmark Metric Change
======================================================
+ lake build clean branch-misses -2.4% (-23.8 σ)
+ stdlib tactic execution -8.4% (-49.9 σ) |
|
After @Kha's change there are still many regressions in Mathlib: leanprover-community/mathlib4#7606 |
|
!bench |
|
Here are the benchmark results for commit a84dad5. Benchmark Metric Change
======================================================
- lake build clean branch-misses 1.7% (15.9 σ)
- lake env branch-misses 2.8% (10.2 σ)
+ stdlib tactic execution -6.8% (-75.1 σ) |
timotree3
left a comment
There was a problem hiding this comment.
A couple cleanups to comments
Co-authored-by: Timo <timorcb@gmail.com>
|
That looks like a defeq abuse problem to me; |
|
[Meta.isDefEq] ❌ FunLike.coe { toFun := ?f } =?= FunLike.coe { toFun := some } ▼
[] ✅ ?α =?= α ▶
[] found messy fun a ↦ (fun x ↦ ?β) a =?= fun a ↦ WithTop α
[] ✅ { toFun := ?f } =?= { toFun := some } ▶
[] ✅ α ↪ Option α =?= α ↪ WithTop α ▶
[] ✅ Function.instFunLikeEmbedding =?= Function.instFunLikeEmbedding ▶
[] ❌ fun a ↦ (fun x ↦ Option α) a =?= fun a ↦ WithTop α ▼
[] ✅ α =?= α
[] ❌ (fun x ↦ Option α) a =?= WithTop α ▼
[] ❌ Option α =?= WithTop α ▼
[] ❌ Option =?= WithTop
[onFailure] ❌ Option α =?= WithTop α
[onFailure] ❌ Option α =?= WithTop α
[onFailure] ❌ FunLike.coe { toFun := ?f } =?= FunLike.coe { toFun := some }
[onFailure] ❌ FunLike.coe { toFun := ?f } =?= FunLike.coe { toFun := some }vs [Meta.isDefEq] ✅ FunLike.coe { toFun := ?f } =?= FunLike.coe { toFun := some } ▼
[] ✅ ?α =?= α ▶
[] found messy fun a ↦ (fun x ↦ ?β) a =?= fun a ↦ WithTop α
[] ✅ { toFun := ?f } =?= { toFun := some } ▶
[] ✅ α ↪ Option α =?= α ↪ WithTop α ▶
[] ✅ Function.instFunLikeEmbedding =?= Function.instFunLikeEmbedding ▶
[] ✅ fun a ↦ (fun x ↦ Option α) a =?= fun a ↦ WithTop α ▼
[] ✅ α =?= α
[] ✅ (fun x ↦ Option α) a =?= WithTop α ▼
[] ✅ Option α =?= WithTop α |
Excluding new rfl and nolint.
kim-em
left a comment
There was a problem hiding this comment.
I think this is good to go, from the point of view of Mathlib.
Thanks everybody that invested time on this PR. Awesome teamwork! |
No description provided.