From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr 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 7901BBC0B for ; Sun, 14 Jan 2007 19:31:21 +0100 (CET) Received: from pih-relay05.plus.net (pih-relay05.plus.net [212.159.14.132]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l0EIVK1N023418 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Sun, 14 Jan 2007 19:31:21 +0100 Received: from [80.229.56.224] (helo=[10.0.0.5]) by pih-relay05.plus.net with esmtp (Exim) id 1H6A8W-0007Yt-83 for caml-list@yquem.inria.fr; Sun, 14 Jan 2007 18:31:20 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Ocaml compiler features Date: Sun, 14 Jan 2007 18:29:37 +0000 User-Agent: KMail/1.9.5 References: <45A87011.8080203@gmail.com> <6ebe51ce0701140959u1314dfaevccbf27ca6de4feee@mail.gmail.com> <45AA74B0.3070309@gmail.com> In-Reply-To: <45AA74B0.3070309@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200701141829.37258.jon@ffconsultancy.com> X-Miltered: at concorde with ID 45AA76F8.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 compiler:01 hashtbl:01 variants:01 hash:01 ocaml:01 edgar:98 frog:98 wrote:01 caml-list:01 ids:01 caml:02 objective:02 sentence:04 overhead:04 On Sunday 14 January 2007 18:21, Edgar Friendly wrote: > Yes to the first sentence, I think no on the second. Map and Hashtbl > are very good, but I think I really want an array. For an ('a, 'b) Map, > this is for situations where the set of 'a is fixed at design time, I > don't see the overhead of Maps and Hashtbls being appropriate. Atomic > variants already have unique ids from 0 to n-1, so they seem quite > appropriate for this kind of task. You should at least measure the overhead of using a hash table before trying to address the overhead... -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists