From: Stefan Monnier <monnier@iro.umontreal.ca>
To: caml-list@inria.fr
Subject: Re: Hashtbls with physical equality?
Date: Mon, 15 Nov 2004 18:42:21 -0500 [thread overview]
Message-ID: <jwvd5yeel8a.fsf-monnier+gmane.comp.lang.caml.inria@gnu.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0411151400080.19815-100000@localhost.localdomain>
> 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
prev parent reply other threads:[~2004-11-15 23:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-14 22:29 Wheeler Ruml
2004-11-15 0:33 ` [Caml-list] " Christian Szegedy
[not found] ` <20041115012212.GA6561@artisan.com>
2004-11-15 2:20 ` Wheeler Ruml
2004-11-15 10:24 ` Alex Baretta
2004-11-15 16:45 ` Wheeler Ruml
2004-11-15 20:34 ` Marcin 'Qrczak' Kowalczyk
2004-11-15 20:37 ` Brian Hurt
2004-11-15 21:03 ` Wheeler Ruml
2004-11-15 21:30 ` Marcin 'Qrczak' Kowalczyk
2004-11-15 23:42 ` Stefan Monnier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvd5yeel8a.fsf-monnier+gmane.comp.lang.caml.inria@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox