`Require Import Coq.Sorting.Permutation.` slows down `rewrite_strat` > 10x
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Ambito
- performance, tooling
Direzione di ricerca
Inizia riproducendo l’esempio fornito di rewrite_strat con e senza Require Import Coq.Sorting.Permutation, quindi leggi l’issue #15596 e la pull request #15597 collegate. Analizza l’interazione tra rewrite_strat e la ricerca delle typeclass dei morfismi; il lavoro è concluso quando viene identificata la regressione e viene fornita una correzione che rimuova il rallentamento segnalato senza affidarsi al workaround.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This is a followup on https://github.com/coq/coq/issues/15596, but this time focusing on Require Import, because the fix for https://github.com/coq/coq/issues/15596 only addressed Require.
Require Import Coq.Lists.List. Import ListNotations.
Require Import Coq.Arith.PeanoNat.
(*
Require Import Coq.Sorting.Permutation.
*)
Local Hint Rewrite Nat.add_0_r : mydb.
Goal forall
(l : list nat)
(v v0 mscratch: nat)
(maprep: Type)
(m: maprep)
(Array : (nat -> nat -> maprep -> Prop) ->
nat -> list nat -> nat -> maprep -> Prop)
(Scalar : nat -> nat -> maprep -> Prop)
(atAddr : nat -> (nat -> maprep -> Prop) -> maprep -> Prop)
(A : atAddr mscratch
(Array Scalar 4
([v0] ++ [v + 0] ++ l)) m),
False.
Proof.
intros.
Time rewrite_strat (topdown (hints mydb)) in A.
Uncommenting the Require Import Coq.Sorting.Permutation. slows down rewrite_strat by > 10x, to ca 3 seconds.
A workaround is
Global Remove Hints Permutation.Permutation_cons Permutation.Permutation_app' :
typeclass_instances.
However, if I try to minimize the slowness by replacing Require Import Coq.Sorting.Permutation. with just the signatures of the two trouble-making instances, there's no slowdown:
Require Import Coq.Classes.Morphisms.
Definition Permutation{A: Type}: list A -> list A -> Prop. Admitted.
Local Instance Permutation_cons A :
Proper (Logic.eq ==> @Permutation A ==> @Permutation A) (@cons A).
Admitted.
Local Instance Permutation_app' A :
Proper (@Permutation A ==> @Permutation A ==> @Permutation A) (@app A).
Admitted.
There seems to be some interesting performance issue in the interaction between rewrite_strat and typeclass search looking for morphisms.
- Lingua principale
- Rocq Prover
- Stelle
- 45
- Fork
- 39
- Merge medio
- 1g 13h
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rocq-prover/stdlib
-
incl_dec and NoDup_dec should be Defined and not QedForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 65/100
rocq-prover/stdlib#25 ·
-
Reals: a constructive pi for the constructive Cauchy reals with a strong irrationality separation theorem (Leibniz series)Forse già presa @hy7pc8gfmf-dotcom l’ha presa 24 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 6/100
rocq-prover/stdlib#315 ·
-
Reals: escape-window separation engine for the constructive Cauchy reals (abstract irrationality criterion)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
rocq-prover/stdlib#312 ·
-
Maintaining NaryFunctionsAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
rocq-prover/stdlib#293 ·
-
Inconsistent OPAM packaging of rocq-stdlibForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
rocq-prover/stdlib#256 · 4 commenti · 3 reazioni ·
Tutte le issue di rocq-prover/stdlib
Issue simili
-
`ShallowWaterModel` allocates ~9 KiB per grid point per RK3 stage on the CPUForse già presa @ali-ramadhan l’ha presa oggi. Apertaperformance 🏍️
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
CliMA/Oceananigans.jl#6421 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
module: profiler test: ut
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
intel/torch-xpu-ops#5996 ·
I maintainer di solito rispondono entro 2 giorni
-
bug performance ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[Performance] Bound resolve_api_hashes raw fallback reads to the 1 MiB region actually scannedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
sjkim1127/Reversecore_MCP#365 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100