Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Native code compile time question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-09-06 (10:01)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Native code compile time question
On Fri, Sep 05, 2008 at 11:26:10AM -0500, Raj Bandyopadhyay wrote:
> On using my code generator on a large program, I generate a file 
> containing about 75K lines of OCaml. The native code compiler takes more 
> than 30 *minutes* to compile this file!  The bytecode compiler takes 
> about 5 secs.

Yeah, bitstring suffers from this a little bit too.  Not to this
extent, but certainly processing our generated file of kernel parsers
(two levels of generated code) can take 45 seconds whereas a normal
invocation of ocamlopt is sub-second.

Perhaps it's worth just checking that your machine isn't running out
of physical RAM and thrashing.  The OCaml garbage collector performs
very badly when this happens.


Richard Jones
Red Hat