From: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
To: oliver <oliver@first.in-berlin.de>
Cc: Gabriel Scherer <gabriel.scherer@gmail.com>,
Hongbo Zhang <bobzhang1988@gmail.com>,
Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] How to profile compiler's performance
Date: Sun, 26 Aug 2012 21:59:24 +0200 [thread overview]
Message-ID: <AF136E3F79894EEE86D12D9E5CE13226@erratique.ch> (raw)
In-Reply-To: <20120826191020.GB1908@siouxsie>
Le dimanche, 26 août 2012 à 21:10, oliver a écrit :
> Which are the sources of this behaviour?
Type inference can be exponential but is rarely so in practice.
> Is this documented somewhere?
A. J. Kfoury, J. Tiuryn, P. Urzyczyn. ML typability is Dexptime-complete. CAAP'90. 1990
http://dx.doi.org/10.1007/3-540-52590-4_50
Harry G. Mairson. Deciding ML typability is complete for deterministic exponential time. POPL'90. 1990
http://dx.doi.org/10.1145/96709.96748
Example program, from Mairson, as found in Pierce's Types and Programming languages:
let f0 = fun x -> (x, x) in
let f1 = fun y -> f0 (f0 y) in
let f2 = fun y -> f1 (f1 y) in
let f3 = fun y -> f2 (f2 y) in
let f4 = fun y -> f3 (f3 y) in
let f5 = fun y -> f4 (f4 y) in
f5 (fun z -> z)
;;
(Start compilation and go make the coffee)
Best,
Daniel
next prev parent reply other threads:[~2012-08-26 19:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-26 14:20 Hongbo Zhang
2012-08-26 15:05 ` Gabriel Scherer
2012-08-26 19:10 ` oliver
2012-08-26 19:36 ` Gabriel Scherer
2012-08-26 19:59 ` Daniel Bünzli [this message]
2012-08-26 20:52 ` oliver
2012-08-27 0:14 ` oliver
2012-08-27 15:33 ` Markus Weißmann
2012-08-26 20:25 ` Hongbo Zhang
2012-08-26 20:05 ` Fabrice Le Fessant
2012-08-26 20:54 ` oliver
2012-08-27 8:00 ` Benedikt Meurer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AF136E3F79894EEE86D12D9E5CE13226@erratique.ch \
--to=daniel.buenzli@erratique.ch \
--cc=bobzhang1988@gmail.com \
--cc=caml-list@inria.fr \
--cc=gabriel.scherer@gmail.com \
--cc=oliver@first.in-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox