From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 44ED6BD44 for ; Tue, 16 Nov 2004 00:42:31 +0100 (CET) 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 iAFNgTwI018771 for ; Tue, 16 Nov 2004 00:42:30 +0100 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 AAA11478 for ; Tue, 16 Nov 2004 00:42:29 +0100 (MET) Received: from main.gmane.org (main.gmane.org [80.91.229.2]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iAFNgTKK018768 for ; Tue, 16 Nov 2004 00:42:29 +0100 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CTqUO-0000QF-00 for ; Tue, 16 Nov 2004 00:42:28 +0100 Received: from asado.iro.umontreal.ca ([132.204.24.84]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Nov 2004 00:42:28 +0100 Received: from monnier by asado.iro.umontreal.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Nov 2004 00:42:28 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Stefan Monnier Subject: Re: Hashtbls with physical equality? Date: Mon, 15 Nov 2004 18:42:21 -0500 Message-ID: References: <16791.56417.334890.765954@katsura.parc.xerox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: asado.iro.umontreal.ca User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:d/jOeYidHzPK9dCu4mh/QiNdeJo= Sender: news X-Miltered: at concorde with ID 41993EE5.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 41993EE5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; umontreal:01 hash:01 hashcode:01 hashcode:01 hashtable:01 equality:01 int:01 objects:02 objects:02 size:95 restriction:05 problem:05 billion:94 billion:94 bit:10 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: > Starting with the fact that it returns a 32-bit *int* (and what happens > when you have more than 4 billion objects? Possible in a 64-bit > system!). It's not an object-id, it's a hash code. I.e. it does not guarantee that a != b ==> a.hashCode() != b.hashCode() so the 32bit restriction is only a serious problem once the size of your hashtable gets close to a billion of buckets. Sure that can happen, but not nearly as soon as a 4GB Java process or even a Java process with 4 billion objects. Stefan