From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id B7C44BB9B for ; Tue, 11 Oct 2005 16:56:46 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j9BEujYh014342 for ; Tue, 11 Oct 2005 16:56:46 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA13133 for ; Tue, 11 Oct 2005 16:56:45 +0200 (MET DST) Received: from mail.physik.uni-muenchen.de (mail.physik.uni-muenchen.de [192.54.42.129]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j9BEuiuF001589 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 11 Oct 2005 16:56:45 +0200 Received: from localhost (unknown [127.0.0.1]) by mail.physik.uni-muenchen.de (Postfix) with ESMTP id 834C22000F; Tue, 11 Oct 2005 16:56:44 +0200 (CEST) Received: from mail.physik.uni-muenchen.de ([127.0.0.1]) by localhost (mail.physik.uni-muenchen.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 22140-01-29; Tue, 11 Oct 2005 16:56:44 +0200 (CEST) Received: from mailhost.cip.physik.uni-muenchen.de (kaiser.cip.physik.uni-muenchen.de [141.84.136.1]) by mail.physik.uni-muenchen.de (Postfix) with ESMTP id 65DAE20006; Tue, 11 Oct 2005 16:56:44 +0200 (CEST) Received: from katrin.cip.physik.uni-muenchen.de (katrin.cip.physik.uni-muenchen.de [141.84.136.12]) by mailhost.cip.physik.uni-muenchen.de (Postfix) with ESMTP id 1B27126F4D; Tue, 11 Oct 2005 16:56:44 +0200 (CEST) Received: by katrin.cip.physik.uni-muenchen.de (Postfix, from userid 3092) id CF4F516BBC; Tue, 11 Oct 2005 16:56:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by katrin.cip.physik.uni-muenchen.de (Postfix) with ESMTP id CA4B32214E; Tue, 11 Oct 2005 16:56:43 +0200 (CEST) Date: Tue, 11 Oct 2005 16:56:43 +0200 (CEST) From: Thomas Fischbacher To: Thomas Fischbacher Cc: yoann padioleau , Christian Lindig , Caml List Subject: EQ hash tables? In-Reply-To: Message-ID: References: <14893115.1128951765427.JavaMail.www@wwinf1521> X-BOFH: Daemons did it MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: amavisd-new at physik.uni-muenchen.de X-Miltered: at nez-perce with ID 434BD2AE.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 434BD2AC.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; hash:01 pointer:01 hash:01 subtrees:01 ocaml:01 2005,:98 cip:98 cip:98 lambda:01 lambda:01 wrote:01 data:02 debian:02 slightly:02 physik: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 Mon, 10 Oct 2005, Thomas Fischbacher wrote: > When you want to associate extra data to stuff that should retain nice > comparison properties, another technique which might be useful or not is > to use a weak pointer hash, mapping subtrees to positions. Actually, this brings me to a question I wanted to ask for a long time: while I never used this so far, I just assumed that OCaml does provide hash tables where keys are compared w.r.t. "being the same" ('==' , that is), rather than only hash tables where keys are compared for "being equal" (say, '='). Of course, "EQ hash tables" have to be treated in a slightly special way when talking about stop© GCing. So, do they really exist, or don't they? -- regards, tf@cip.physik.uni-muenchen.de (o_ Thomas Fischbacher - http://www.cip.physik.uni-muenchen.de/~tf //\ (lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y) V_/_ (if (= x 0) y (g g (- x 1) (* x y)))) n 1)) (Debian GNU)