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 2D9D8BC32 for ; Sun, 13 Mar 2005 15:52:41 +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 j2DEqewY011402 for ; Sun, 13 Mar 2005 15:52:40 +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 PAA02877 for ; Sun, 13 Mar 2005 15:52:40 +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 j2DEqcLP011399 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sun, 13 Mar 2005 15:52:39 +0100 Received: from localhost (localhost [127.0.0.1]) by saul.cis.upenn.edu (8.12.10/8.12.9) with ESMTP id j2DEqZCP016922; Sun, 13 Mar 2005 09:52:35 -0500 (EST) Date: Sun, 13 Mar 2005 09:52:34 -0500 (EST) Message-Id: <20050313.095234.125114068.eijiro_sumii@anet.ne.jp> To: caml-list@inria.fr Cc: Thomas.Fischbacher@Physik.Uni-Muenchen.DE, sumii@saul.cis.upenn.edu Subject: Re: [Caml-list] how to "disable" GC? From: Eijiro Sumii In-Reply-To: References: <20050312.225725.125114910.eijiro_sumii@anet.ne.jp> 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 423453B8.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 423453B6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 eijiro:01 sumii:01 eijiro:01 sumii:01 runtime:01 ocamlopt:01 ocamlopt:01 rec:01 ...:98 slower:01 int:01 int:01 hierarchy:01 newline:02 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: From: "Thomas Fischbacher" > > 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.) > > Quite in general, Cache hierarchy may be an issue here. This is right, but let me clarify my question: Why is _anything_ heap-allocated, for example in the program below (given in my previous message)? According to the assembly and intermediate code in ocamlopt, there is indeed something heap-allocated in the else-clause of tak, but I don't know what this is for... Are floting-point numbers heap-allocated in ocamlopt on sparc?? | (**********************************************************************) | 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 () | (**********************************************************************) > setenv OCAMLRUNPARAM 's=1000' > time ./tak.ocamlopt 11000000 3.54u 0.01s 0:03.56 99.7% > setenv OCAMLRUNPARAM 's=1000000000' > time ./tak.ocamlopt 11000000 6.83u 1.50s 0:08.80 94.6%