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=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 4F04BBC0A for ; Wed, 6 Jun 2007 18:51:34 +0200 (CEST) Received: from ipmail03.adl2.internode.on.net (ipmail03.adl2.internode.on.net [203.16.214.135]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l56GpVnb020829 for ; Wed, 6 Jun 2007 18:51:33 +0200 X-IronPort-AV: E=Sophos;i="4.16,390,1175437800"; d="scan'208";a="99860768" Received: from ppp2-129.lns1.syd7.internode.on.net (HELO [192.168.1.201]) ([59.167.2.129]) by ipmail03.adl2.internode.on.net with ESMTP; 07 Jun 2007 02:21:30 +0930 Subject: Re: [Caml-list] compiling large file hogs RAM and takes a long time. From: skaller To: Sam Steingold Cc: caml-list@inria.fr In-Reply-To: <4666E11F.6000308@podval.org> References: <4666E11F.6000308@podval.org> Content-Type: text/plain Date: Thu, 07 Jun 2007 02:51:26 +1000 Message-Id: <1181148686.6546.0.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 4666E613.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; hash:01 parser:01 ocaml:01 variants:01 ocamlopt:01 ocamlopt:01 bytecode:01 sourceforge:01 polymorphic:01 wrote:01 wrote:01 caml-list:01 kernel:01 variant:02 variant:02 On Wed, 2007-06-06 at 12:30 -0400, Sam Steingold wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I wrote a parser generator for a tick data file. > The generated OCaml file is ~1Mb and contains ~120 variant type > definitions (each with 2 to ~100 variants) plus one polymorphic variant > type. > When I compiled it with ocamlopt (3.09.3), it took almost 10 minutes and > consumed ~500MB RAM (Firefox and Thunderbird were killed by the kernel > to make space for ocamlopt). Use ocamlopt.opt .. ocamlopt is actually a bytecode program .. -- John Skaller Felix, successor to C++: http://felix.sf.net