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 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 22031BBAF for ; Fri, 5 Sep 2008 18:26:24 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsMCADz6wEiAKgEfiGdsb2JhbACSNQEBAQ8gnTmGMT2BZQ X-IronPort-AV: E=Sophos;i="4.32,320,1217800800"; d="scan'208";a="16880861" Received: from unknown (HELO mail.cs.rice.edu) ([128.42.1.31]) by mail1-smtp-roc.national.inria.fr with ESMTP; 05 Sep 2008 18:26:23 +0200 Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1]) by mail.cs.rice.edu (Postfix) with ESMTP id 478CB2C2C9B for ; Fri, 5 Sep 2008 11:26:20 -0500 (CDT) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Received: from mail.cs.rice.edu ([127.0.0.1]) by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WP6VLEB0ddot for ; Fri, 5 Sep 2008 11:26:19 -0500 (CDT) Received: from [10.121.20.217] (unknown [10.121.20.217]) (using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.rice.edu (Postfix) with ESMTP id A19C52C2B32 for ; Fri, 5 Sep 2008 11:26:19 -0500 (CDT) Message-ID: <48C15DA2.6060800@rice.edu> Date: Fri, 05 Sep 2008 11:26:10 -0500 From: Raj Bandyopadhyay User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Native code compile time question Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocaml:01 ocaml:01 compiler:01 compiler:01 bytecode:01 -inline:01 compilation:01 compile:01 compile:01 native:03 native:03 problem:05 raj:05 raj:05 implementing:06 Hi all I am implementing a language by generating OCaml code for input source and using the OCaml native code compiler. However, I've run into a strange problem. 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. I ran the native code compiler without any -inline or other optimizations and its still the same. For smaller OCaml files, the compilation time is ok for me. For example, it takes about 12 seconds to compile a 15K line OCaml file. Any ideas why this might be happening and how I can deal with this? Thanks Raj