Skip to Content.
Sympa Menu

coq-club - [Coq-Club] very slow rewrite in *|- in 8.5beta3

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] very slow rewrite in *|- in 8.5beta3


Chronological Thread 
  • From: Jonathan Leivent <jonikelee AT gmail.com>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: [Coq-Club] very slow rewrite in *|- in 8.5beta3
  • Date: Thu, 12 Nov 2015 23:41:09 -0500
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jonikelee AT gmail.com; spf=Pass smtp.mailfrom=jonikelee AT gmail.com; spf=None smtp.helo=postmaster AT mail-yk0-f175.google.com
  • Ironport-phdr: 9a23:Cn+OGhGG44YlFh77CXkmdZ1GYnF86YWxBRYc798ds5kLTJ75oM6wAkXT6L1XgUPTWs2DsrQf27eQ7virBj1IyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/niqbvo9aMMk1hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv+YJa6jxfrw5QLpEF3xmdjltvIy4/SXEGCCI/zM3Vngc2k5DBBGA5xXnVL/wtDH7v6xzwn/JE9fxSOUWXjKr86diTlfMhSYZOjgluDXVjcpxj69frR+JqBl2woqSa4aQYqktNpjBdM8XEDISFv1aUDZMV8blN9MC

Is anyone else experiencing extremely slow "rewrite in *|-" in recent 8.5?

I compared a problematic rewrite in *|- against a repeat/match/context/rewrite tactic that does the same set of rewrites in the goal, and the rewrite in *|- was 8X slower. But, removing the context pattern removes the 8X speedup.

Schematically, I did this:

Lemma RW : forall ... L = R.

...

Time rewrite ?RW in *|-. (*takes 2.6 secs*)
Undo.
Time repeat match goal with
| H : context [L] |- _ => rewrite RW in H end. (*takes 0.3 secs*)
Undo.
Time repeat match goal with
| H : _ |- _ => rewrite RW in H end. (*takes 2.3 secs*)

So, in other words, the context pattern speeds things up 8X.

This is in 8.5 beta3, git version 951b332. I don't know if this speed anomaly existed prior to 8.5beta3 - but I can try earlier versions, if someone suggests one to try.

-- Jonathan




Archive powered by MHonArc 2.6.18.

Top of Page