From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id D2CFCD192 for ; Tue, 26 Jul 2005 03:34:26 +0200 (CEST) Received: from pih-relay06.plus.net (fuzznuts.plus.net [212.159.14.133] (may be forged)) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6Q1YQbS013213 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 26 Jul 2005 03:34:26 +0200 Received: from [80.229.56.224] (helo=chetara) by pih-relay06.plus.net with esmtp (Exim) id 1DxEKn-0003XJ-7P for caml-list@yquem.inria.fr; Tue, 26 Jul 2005 02:34:17 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. Subject: Re: [Caml-list] How to do this properly with OCaml? Date: Tue, 26 Jul 2005 02:32:16 +0100 User-Agent: KMail/1.7.2 To: caml-list@yquem.inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507260232.16876.jon@ffconsultancy.com> X-Miltered: at nez-perce with ID 42E59322.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 timings:01 ocaml:01 frog:98 wrote:01 wrote:01 slower:01 extensible:01 structures:01 supported:01 data:02 caml:02 implemented:02 functional:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Monday 25 July 2005 18:21, Ken Rose wrote: > skaller wrote: > > I would appreciate an officially supported variable > > length array a lot: it can't be efficiently implemented > > *without* Obj.magic. > > I must be missing something obvious. What's wrong with map? Map is several times slower (e.g. for 10^3 elements). There are timings of many important operations on various data structures in the optimisation chapter of my OCaml book. Map is also not quite an extensible array because you'd have to handle the lookup values yourself. Does anyone have links to tree-based functional array implementations in OCaml? -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists