From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id ABA4BBC75 for ; Fri, 11 Feb 2005 22:07:37 +0100 (CET) Received: from first.in-berlin.de (dialin-145-254-065-087.arcor-ip.net [145.254.65.87]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1BL7Xgv010575 for ; Fri, 11 Feb 2005 22:07:35 +0100 Received: by first.in-berlin.de (Postfix, from userid 501) id 4770FAACC6; Fri, 11 Feb 2005 22:07:30 +0100 (CET) Date: Fri, 11 Feb 2005 22:07:29 +0100 From: Oliver Bandel To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Memory allocation nano-benchmark. Message-ID: <20050211210729.GA466@first.in-berlin.de> References: <420B7A7E.90504@or.uni-bonn.de> <005101c50f7f$6db0e560$d54380d9@mshome.net> <1108048745.16698.101.camel@pelican.wigram> <014801c50f8e$a08e9a40$d54380d9@mshome.net> <015f01c50f99$e8a57e60$d54380d9@mshome.net> <420BBC7D.5070103@t-online.de> <002401c5101b$4130b640$a2f40b50@mshome.net> <1108127068.16698.320.camel@pelican.wigram> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1108127068.16698.320.camel@pelican.wigram> User-Agent: Mutt/1.5.6i X-Miltered: at nez-perce with ID 420D1E95.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; oliver:01 bandel:01 oliver:01 in-berlin:01 caml-list:01 wrote:01 gava:01 wrote:01 imho:01 'real':01 bigarray:01 ...:98 paging:98 frederic:03 perhaps:03 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.2 X-Spam-Level: On Sat, Feb 12, 2005 at 12:04:32AM +1100, skaller wrote: > On Fri, 2005-02-11 at 20:22, Frédéric Gava wrote: > > > > > You could write; > > for i=0 to tablesize -1 do > > let row1 = table.(i) in > > for j=0 to tablesize -1 do > > let row2 = row1.(j) do > > for k=0 to tablesize -1 do > > row2.(k) <- (i+1)*(j+1)*(k+1) > > done done done > > > > and peraps you will have a faster code. > > I found no difference, here are two runs: > > [skaller@pelican] ~>time ./zmem 250 > > real 0m3.110s > user 0m2.820s > sys 0m0.240s > > [skaller@pelican] ~>time ./zmem 250 > > real 0m27.732s > user 0m2.750s > sys 0m0.340s Two runs, no difference? Are you sure zmem and zmem are the same? IMHO > real 0m3.110s > user 0m2.820s > sys 0m0.240s and > real 0m27.732s > user 0m2.750s > sys 0m0.340s differ... > > The huge 'real' time there is VM paging. > > Perhaps Xavier will bless us with a comment as to > whether invariant code motion optimisation is actually > done in > > table.(i).(j).(k) <- (i+1)*(j+1)*(k+1) > > Using bigarray (c_layout): > > real 0m27.948s > user 0m0.770s > sys 0m0.500s > > .. 4 times faster. ? What is faster than what?! Is zmem zmem? What is zmem? Ciao, Oliver