caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Very slow compilation
@ 2012-03-11  8:11 SerP
  2012-03-11  8:39 ` Gabriel Scherer
  2012-03-13 16:58 ` Richard W.M. Jones
  0 siblings, 2 replies; 10+ messages in thread
From: SerP @ 2012-03-11  8:11 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 744 bytes --]

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
7-13 seconds. The entire projet is compiled within 10-15 minutes. The major
part of the time is taken by "Typemod.type_implementation", which include
many calls of Ctype.unify (80% of compilation time). Now, it is getting
hard and slow to develop the projetct, are there any ways to accelarate it?
It is difficult to get all fine points, but I wish I could make the process
faster. Thanks for any help or comments. Looking forward to your reply

[-- Attachment #2: Type: text/html, Size: 789 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [Caml-list] Very slow compilation
@ 2012-03-14 14:45 tools
  0 siblings, 0 replies; 10+ messages in thread
From: tools @ 2012-03-14 14:45 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 742 bytes --]

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 z

let () = 
  let () = f 
    a a a a 
    a a a a 
    a a a a 
    a a a a 
    a a a a 
    a a a 
    sink 
  in
  ();;

$> time ocamlc vararg.ml
real    1m9.372s
user    1m9.264s
sys    0m0.044s



Try adding a few a's and see what that gives.

have fun,
Romain.

PS

I'm quite clueless about what's going on exactly. I just stumbled onto this tinkering around with MLton's fold vararg solutions.

[-- Attachment #2: Type: text/html, Size: 1286 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-03-14 14:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-11  8:11 [Caml-list] Very slow compilation SerP
2012-03-11  8:39 ` Gabriel Scherer
2012-03-11  9:04   ` Adrien
2012-03-11  9:21   ` Raphael Proust
2012-03-13 22:02     ` Matti Jokinen
2012-03-13 22:46       ` Gerd Stolpmann
2012-03-14  5:33         ` Gabriel Scherer
2012-03-14  8:52         ` Pierre Chambart
2012-03-13 16:58 ` Richard W.M. Jones
2012-03-14 14:45 tools

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).