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 1895CBC75 for ; Sat, 12 Feb 2005 01:45:00 +0100 (CET) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1C0ivDv029708 for ; Sat, 12 Feb 2005 01:44:59 +0100 Received: from [192.168.1.200] (ppp212-197.lns2.syd3.internode.on.net [203.122.212.197]) by smtp1.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id j1C0iqmQ014886; Sat, 12 Feb 2005 11:14:52 +1030 (CST) Subject: Re: [Caml-list] Memory allocation nano-benchmark. From: skaller Reply-To: skaller@users.sourceforge.net To: Oliver Bandel Cc: caml-list@yquem.inria.fr In-Reply-To: <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> <20050211210729.GA466@first.in-berlin.de> Content-Type: text/plain Organization: Message-Id: <1108169091.3474.16.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 12 Feb 2005 11:44:52 +1100 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 420D518A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 sourceforge:01 oliver:01 bandel:01 wrote:01 binary:01 imho:01 bigarray:01 arrays:01 bigarray:01 glebe:01 ...:98 061:98 nsw:01 snail: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: On Sat, 2005-02-12 at 08:07, Oliver Bandel wrote: > > [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? Yes, its the same binary. > > IMHO > > > real 0m3.110s > > user 0m2.820s > > sys 0m0.240s > > and > > > real 0m27.732s > > user 0m2.750s > > sys 0m0.340s > > differ... Not significantly in user time. Remember this is not a serious measurement. > > 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?! The code using ordinary arrays runs in 2.8 seconds, using bigarray 0.7 seconds. 4 x 0.7 = 2.8. bigarray is 4 times faster to write than three level ordinary array. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net