From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 81B80BC32 for ; Sun, 13 Mar 2005 04:57:34 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j2D3vYuv017565 for ; Sun, 13 Mar 2005 04:57:34 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id EAA22125 for ; Sun, 13 Mar 2005 04:57:32 +0100 (MET) Received: from saul.cis.upenn.edu (SAUL.CIS.upenn.edu [158.130.12.4]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j2D3vUAE017562 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sun, 13 Mar 2005 04:57:32 +0100 Received: from localhost (localhost [127.0.0.1]) by saul.cis.upenn.edu (8.12.10/8.12.9) with ESMTP id j2D3vPCP020376; Sat, 12 Mar 2005 22:57:28 -0500 (EST) Date: Sat, 12 Mar 2005 22:57:25 -0500 (EST) Message-Id: <20050312.225725.125114910.eijiro_sumii@anet.ne.jp> To: caml-list@inria.fr Cc: sumii@saul.cis.upenn.edu Subject: how to "disable" GC? From: Eijiro Sumii X-Mailer: Mew version 3.2 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4233BA2E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 4233BA2A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; eijiro:01 sumii:01 eijiro:01 sumii:01 ocaml:01 ocaml:01 variants:01 minor:01 heap:01 runtime:01 rec:01 upenn:01 ...:98 slower:01 slower:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: Hello, I'm trying some very unfair:-) comparisons between OCaml and MinCaml (min-caml.sf.net), and wondering how to _disable_ GC in OCaml (on SPARC). I've tried setenv OCAMLRUNPARAM 's=1000000000,v=0x1ff' and its variants, but none of them seem to stop GC from happening - and once it happens, it's MUCH slower of course! By the way, the machine has 8GB main memory. So, my questions are: 1. How does the GC happen at all when the minor heap is so huge? The programs don't seem to use so much memory anyway... 2. Some programs get much slower for larger heaps, even though they don't seem to trigger any GC. An example is such programs is given below. Why is this? (There also exist programs that are not affected at all, so this is not because of the initialization overhead of the runtime system.) (**********************************************************************) let rec tak x y z = if y >= x then z else tak (tak (x -. 1.0) y z) (tak (y -. 1.0) z x) (tak (z -. 1.0) x y) in let n = 10.0 in print_int (int_of_float (1000000.0 *. tak (n *. 3.0) (n *. 2.0) (n *. 1.0))); print_newline () (**********************************************************************) Thanks in advance, -- Eijiro Sumii (http://www.cis.upenn.edu/~sumii/) Department of Computer and Information Science, University of Pennsylvania