From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 09BE5BBAF for ; Sat, 6 Sep 2008 12:01:15 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuUCAD7ywUhQRFuwiGdsb2JhbACSOAEBAQ8goRaBZYMx X-IronPort-AV: E=Sophos;i="4.32,344,1217800800"; d="scan'208";a="14639452" Received: from furbychan.cocan.org ([80.68.91.176]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES256-SHA; 06 Sep 2008 12:01:14 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1KbubR-0003bJ-NU; Sat, 06 Sep 2008 11:01:13 +0100 Date: Sat, 6 Sep 2008 11:01:13 +0100 To: Raj Bandyopadhyay Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Native code compile time question Message-ID: <20080906100113.GB13011@annexia.org> References: <48C15DA2.6060800@rice.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48C15DA2.6060800@rice.edu> User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; ocaml:01 compiler:01 bytecode:01 compiler:01 parsers:01 invocation:01 ocamlopt:01 ocaml:01 garbage:01 wrote:01 compile:01 compile:01 caml-list:01 checking:02 kernel:02 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. Rich. -- Richard Jones Red Hat