Dear list members, I wrote: > With pml I seem to get a polynomial > behavior (at least quadratic but probably cubic), I tested up to 9. > This is because the type of xi is bigger and bigger (but linear in i) > and it is copied by the generalisation and particularisation for each i. > > Sorry, this was wrong, the size of the type generated by the example is a double exponential without sharing (so it breaks around 5-6 in OCaml) and single exponential if you share subtypes (then it breaks for 11-12 in PML). What I find strange is that even with -rectypes, OCaml does not discover that it can share subtypes (as my algorithm in pml does) for this example. May be there is a little room for improvement for the (theoretical) complexity of the algorithm in OCaml, but may be it is useless in practice. Christophe PS: if you want to know more about pml, go to http://www.lama.univ-savoie.fr/~raffalli/pml, but do not use the tar archive it is outdated, use the darcs repository.