caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christophe Raffalli <Christophe.Raffalli@univ-savoie.fr>
To: caml-list@inria.fr
Subject: [Caml-list] ocaml defaut hash ?
Date: Sat, 23 Apr 2016 11:16:30 +0200	[thread overview]
Message-ID: <20160423091630.GA25686@delli7.univ-savoie.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 598 bytes --]


Hello,

I am hashing value of type (bool * int array), where the size of the
array is 8.

According to the documentation, I think all words should be considered
by the default hash function.  Nevertheless, I get the following
histogram for bucket size, showing a lot of collision:

0 -> 9369
1 -> 506
2 -> 3387
3 -> 221
4 -> 1871
5 -> 119
6 -> 594
7 -> 34
8 -> 195
9 -> 16
10 -> 51
11 -> 7
12 -> 11
13 -> 1
14 -> 2

By the way what I really need is a hash function for arrays that I can
update when I update one entry in the array.  Does anyone known of
such a hash function ?

Cheers,
Christophe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

             reply	other threads:[~2016-04-23  9:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-23  9:16 Christophe Raffalli [this message]
2016-04-23 11:21 ` Gerd Stolpmann
2016-04-23 15:41   ` Christophe Raffalli
2016-04-23 17:22     ` Gerd Stolpmann

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=20160423091630.GA25686@delli7.univ-savoie.fr \
    --to=christophe.raffalli@univ-savoie.fr \
    --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;
as well as URLs for NNTP newsgroup(s).