English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
RE: [Caml-list] Turning off type-checking
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-05-14 (07:56)
From: eijiro_sumii@a...
Subject: Re: [Caml-list] Turning off type-checking
From: Francois Pottier <francois.pottier@inria.fr>
> > Well, type-checking ML involves more than term unification -- the 
> > worst case complexity is something truly horrible (EXP-time).
> > Having said this, for most programs, the worst-case complexity
> > rarely, if ever arises in "natural" code.  (I've not run into
> > it...)
> The worst-case complexity is obtained by nesting `let' bindings
> on the left side, i.e.
>   let x1 = let x2 = let x3 = ...
> Do you generate such code, Markus?

Just for information, I once came across a real situation where I
generated similar code with too much nested 'let' and
ocamlc/ocamlopt/ocamlc.opt/ocamlopt.opt ran out of memory or did not
terminate within a practical amount of time.  I am not sure whether
that was because of type checking, though.  (See the "PLClubCN"
version of our entry to ICFP Programming Contest 2000 in case of any

Eijiro Sumii (http://www.yl.is.s.u-tokyo.ac.jp/~sumii/)
Research Associate, Department of Computer Science, University of Tokyo
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners