From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA18860; Tue, 10 Jul 2001 10:33:02 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 KAA18856 for ; Tue, 10 Jul 2001 10:33:01 +0200 (MET DST) Received: from snfc21.pbi.net (mta6.snfc21.pbi.net [206.13.28.240]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f6A8X0X19624 for ; Tue, 10 Jul 2001 10:33:00 +0200 (MET DST) Received: from checkerlap.d6.com ([64.169.160.238]) by mta6.snfc21.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTP id <0GG90065K12XGR@mta6.snfc21.pbi.net> for caml-list@inria.fr; Tue, 10 Jul 2001 01:32:58 -0700 (PDT) Date: Tue, 10 Jul 2001 01:34:25 -0700 From: Chris Hecker Subject: [Caml-list] why does hashtbl not use lists? X-Sender: def6@shell16.ba.best.com To: caml-list@inria.fr Message-id: <4.3.2.7.2.20010710013127.02c06600@shell16.ba.best.com> MIME-version: 1.0 X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Why does hashtbl.ml (from the standard library) use the bucketlist variant instead of just the built in lists with tuples? Is there an efficiency thing going on here? type ('a, 'b) t = { mutable max_len: int; (* max length of a bucket *) mutable data: ('a, 'b) bucketlist array } (* the buckets *) and ('a, 'b) bucketlist = Empty | Cons of 'a * 'b * ('a, 'b) bucketlist instead of type ('a, 'b) t = { mutable max_len: int; (* max length of a bucket *) mutable data: ('a * 'b) list array } (* the buckets *) Chris ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr