From: padiolea@irisa.fr
To: "Erik de Castro Lopo" <ocaml-erikd@mega-nerd.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Hashtbl.create 401
Date: Fri, 22 Apr 2005 14:06:44 +0200 (CEST) [thread overview]
Message-ID: <40833.131.254.50.45.1114171604.squirrel@mail.irisa.fr> (raw)
In-Reply-To: <20050422132131.6ff2fbee.ocaml-erikd@mega-nerd.com>
> On Thu, 21 Apr 2005 21:09:18 -0600
> Matt Gushee <mgushee@havenrock.com> wrote:
>
>> Hello, all--
>>
>> While browsing through the Labltk source code (and perhaps in some other
>> places), I noticed several instances of:
>>
>> Hashtbl.create 401
>>
>> Why 401?
>
> Hash tables distribute data across a set of hash buckets. If
> the number of hash buckets is prime (401 is prime) then their
> is a better chance of the data being evenly distributed across
> the buckets.
but it seems that this number is not that much important since,
as said in the ml source:
(* We do dynamic hashing, and resize the table and rehash the elements
when buckets become too long. *)
>
> Erik
> --
> +-----------------------------------------------------------+
> Erik de Castro Lopo nospam@mega-nerd.com (Yes it's valid)
> +-----------------------------------------------------------+
> "I invented the term Object-Oriented, and I can tell you I
> did not have C++ in mind." -- Alan Kay
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
next prev parent reply other threads:[~2005-04-22 12:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-22 3:09 Matt Gushee
2005-04-22 3:21 ` [Caml-list] " Erik de Castro Lopo
2005-04-22 12:06 ` padiolea [this message]
2005-04-23 0:26 ` sejourne_kevin
2005-04-22 3:33 ` Radu Grigore
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=40833.131.254.50.45.1114171604.squirrel@mail.irisa.fr \
--to=padiolea@irisa.fr \
--cc=caml-list@yquem.inria.fr \
--cc=ocaml-erikd@mega-nerd.com \
/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