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 120DCBC0A for ; Wed, 6 Jun 2007 18:30:34 +0200 (CEST) Received: from smtp.janestcapital.com (www.janestcapital.com [66.155.124.107]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l56GUWfl017108 for ; Wed, 6 Jun 2007 18:30:33 +0200 Received: from [172.25.131.105] [38.96.172.125] by janestcapital.com with ESMTP (SMTPD-9.10) id A13001BC; Wed, 06 Jun 2007 12:30:40 -0400 Message-ID: <4666E11F.6000308@podval.org> Date: Wed, 06 Jun 2007 12:30:23 -0400 From: Sam Steingold User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: caml-list@inria.fr Subject: compiling large file hogs RAM and takes a long time. X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 4666E128.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 conceptually:01 polymorphic:01 wrote:01 kernel:01 variant:02 variant:02 data:02 compiling:02 seems:03 -----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). I run Linux 2.6.18.8 on a dual CPU Pentium D 2.80GHz with 1GB of RAM. (in 32-bit mode) So, is this something to be expected? 10 min / 500MB seems like a little bit excessive to me, given that the file is really very simple conceptually. Thanks! Sam. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGZuEfPp1Qsf2qnMcRAjSYAKCFD4QBQdxk7qCGRb2LyHPHz5QrSQCgmjLl yxHaXIU7wK6j+gWhG+zbZvA= =nfep -----END PGP SIGNATURE-----