Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Time analysis

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Time analysis


Chronological Thread 
  • From: Cedric Auger <sedrikov AT gmail.com>
  • To: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Time analysis
  • Date: Mon, 2 Nov 2015 14:27:21 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=sedrikov AT gmail.com; spf=Pass smtp.mailfrom=sedrikov AT gmail.com; spf=None smtp.helo=postmaster AT mail-ig0-f172.google.com
  • Ironport-phdr: 9a23:Bamsxh2yTY/HQhOwsmDT+DRfVm0co7zxezQtwd8ZsegTLPad9pjvdHbS+e9qxAeQG96LtrQe1qGK7OjJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6PyZ7qnLzts7ToICx2xxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cY6Lod8JsKWqLjOq88ULZwDTI8Mmlz6teh/U3IShLK7X8BWE0XlABJCk7L9kepcI32t37Ru+Zn2SLSFND5QKp8DS+v471qSxj2oCgCPj89tmrQj5oj3+pgvBu9qkknkMbva4aPOa8mcw==

Keep in mind, also that Coq semantics does not take into account whether evaluation is lazy or eager.

If you want to extract code to Haskell or OCaml, execution time behaviour can largely differ.

2015-11-02 9:14 GMT+01:00 Tillmann Weisser <tweisser AT laas.fr>:
Dear Coq-Club,

I want to do a time analysis of a function in my code. However, I don't really know how to do this. Here is my problem:

Given 3 types A, B and C and converting functions g: A -> B and h: B -> C. I want to analyse the function f:= h o g.  In particular I'm interested in the question which part of f (i.e. g or h)  takes most of the time.

Let now a be of type A. I ran the commands

Time Eval vm_compute in (f a).
Time Eval vm_compute in (g a).
Let b:= Eval vm_compute in (g a).
Time Eval vm_compute in (h b).

However, the evaluation of (h b) is as slow as the evaluation of (f a), whereas the evaluation of (g a) is a little bit faster than the others. (The times of (g a) and (h b) do not sum up to the time of (f a).) What can I conclude from that? Is there a better way to analyse f?

Thanks for your help in advance!
 Tillmann







Archive powered by MHonArc 2.6.18.

Top of Page