Re: [Caml-list] Very slow compilation

2012-03-14 Thread tools
Yo, I don't know if this helps, but I can create arbitrary compilation times with very small code samples: let sink (a,f) = f a let base = () let finish () = () let step () = () let fold (a,f) g = g (a,f) let step0 h (a,f) = fold (h a,f) let f z = fold (base, finish) z let a z = step0 step

Re: [Caml-list] Very slow compilation

2012-03-13 Thread Richard W.M. Jones
On Sun, Mar 11, 2012 at 12:11:51PM +0400, SerP wrote: We encountered a problem of a slow compilation. When the project grew up, the time of compilation increased considerably. We have many classes and objects, and the type checking of objects and classes performs very slowly. I have Core i3

[Caml-list] Very slow compilation

2012-03-11 Thread SerP
We encountered a problem of a slow compilation. When the project grew up, the time of compilation increased considerably. We have many classes and objects, and the type checking of objects and classes performs very slowly. I have Core i3 3GHz iMac, and the average compilation time of one module is

Re: [Caml-list] Very slow compilation

2012-03-11 Thread Gabriel Scherer
I can't comment on the type-checker internals, but a general first step would be to make sure that you don't recompile things that you don't need to. If you change the *implementation* of a module without changing its interface, you should not have to recompile any other module, at least when

Re: [Caml-list] Very slow compilation

2012-03-11 Thread Adrien
Hi, On 11/03/2012, Gabriel Scherer gabriel.sche...@gmail.com wrote: I can't comment on the type-checker internals, but a general first step would be to make sure that you don't recompile things that you don't need to. There's another easy thing to try: using .opt version of the ocaml

Re: [Caml-list] Very slow compilation

2012-03-11 Thread Raphael Proust
When working with ocamlduce (a few years ago) the same problem was raised. A simple thing that can greatly reduce typing time is putting explicit type annotations. Although the verbosity is increased it is not that much of a burden if the annotated parts do not evolve too much. The same probably