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 07E17BC88 for ; Thu, 10 Feb 2005 20:38:45 +0100 (CET) Received: from ptb-relay02.plus.net (ptb-relay02.plus.net [212.159.14.213]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j1AJciA4014298 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 10 Feb 2005 20:38:44 +0100 Received: from [80.229.56.224] (helo=chetara) by ptb-relay02.plus.net with esmtp (Exim) id 1CzK9B-000H4i-Ve for caml-list@yquem.inria.fr; Thu, 10 Feb 2005 19:38:42 +0000 From: Jon Harrop Organization: University of Cambridge To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Memory allocation nano-benchmark. Date: Thu, 10 Feb 2005 19:40:26 +0000 User-Agent: KMail/1.7.1 References: <420B7A7E.90504@or.uni-bonn.de> <420BB3E3.1060005@t-online.de> In-Reply-To: <420BB3E3.1060005@t-online.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200502101940.26578.jon@jdh30.plus.com> X-Miltered: at concorde with ID 420BB844.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 wrote:01 non-uniform:01 ocaml:01 ocaml:01 initialise:01 iirc:01 ...:98 ...:98 frog:98 data:02 transform:02 transform:02 output:02 perhaps:03 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 Thursday 10 February 2005 19:20, Christian Szegedy wrote: > ... This example was extracted from a program which > massively shuffles around the content of this 3-dimensional grid. > (Both work fine and yield identical output.) Perhaps a non-uniform data structure would be more suitable? OCaml would really shine at this... > To my astonishment, the OCaml was a bit faster than C when > working on the grid, but the speed of allocation was nowhere > near to that of the C version. Yes, there is a lot of overhead when doing this in ocaml. > This was a surprise to me, since I thought that OCaml is quite > competitive in this regard. No, I've also found this with a wavelet transform too. The time taken to do the transform was within a few percent but the time taken to initialise was double for ocaml compared to C, IIRC. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd.