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 90281BC48 for ; Thu, 31 Mar 2005 20:05:47 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j2VI5lrG022608 for ; Thu, 31 Mar 2005 20:05:47 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA09404 for ; Thu, 31 Mar 2005 20:05:46 +0200 (MET DST) Received: from vapor.isi.edu (vapor.isi.edu [128.9.64.64]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j2VI5jDN019609 for ; Thu, 31 Mar 2005 20:05:46 +0200 Received: from albini.isi.edu (albini.isi.edu [128.9.216.111]) by vapor.isi.edu (8.11.6p2+0917/8.11.2) with ESMTP id j2VI4ls28412 for ; Thu, 31 Mar 2005 10:04:47 -0800 (PST) Date: Thu, 31 Mar 2005 10:04:47 -0800 (PST) From: Hal Daume III To: caml-list@inria.fr Subject: Re: [Caml-list] generic data type -> int function In-Reply-To: <20050331170106.GA2939@furbychan.cocan.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-ISI-4-38-10-MailScanner: Found to be clean X-MailScanner-From: hdaume@isi.edu X-Miltered: at concorde with ID 424C3BFB.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 424C3BF9.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 arrays:01 hashtbl:01 arrays:01 hashtbl:01 wrote:01 wrote:01 integer:01 essentially:01 int:01 data:02 data:02 maths:02 talks:02 types: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 Thu, 31 Mar 2005, Richard Jones wrote: > On Thu, Mar 31, 2005 at 06:33:12AM -0800, Hal Daume III wrote: > > I want to use complex data types as indices in arrays, essentially. > > How about using Hashtbl or Map with the key being the complex data > type? Of course it won't be as fast an integer index into an Array, > but it might be easier to understand. Way way way too slow. As it is, using arrays, my program takes about 5 hours to run. A first version using a Hashtbl took well over two days. -- Hal Daume III | hdaume@isi.edu "Arrest this man, he talks in maths." | www.isi.edu/~hdaume