From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,76e8d825615718a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!.POSTED!not-for-mail From: Warren Newsgroups: comp.lang.ada Subject: Re: Ada.Containers Hash function for a set of small integers Date: Thu, 6 May 2010 15:46:39 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <50701baa-7c05-450c-a42d-c699516ddc00@t14g2000prm.googlegroups.com> Injection-Date: Thu, 6 May 2010 15:46:39 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="9f8M0iN5t54V+4DF/iqO8g"; logging-data="15359"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/u26+kF9OIfywkRt54NGknfOyNCt/Z82E=" User-Agent: Xnews/5.04.25 X-Face: &6@]C2>ZS=NM|HE-^zWuryN#Z/2_.s9E|G&~DRi|sav9{E}XQJb*\_>=a5"q]\%A;5}LKP][1mA{gZ,Q!j Cancel-Lock: sha1:XzNe9vnXlJDmTE9NeNa+lwGfdls= Xref: g2news2.google.com comp.lang.ada:11329 Date: 2010-05-06T15:46:39+00:00 List-Id: =?iso-8859-15?Q?Yannick_Duch=EAne_=28Hibou57=29?= expounded in news:op.vb7teo1pxmjfy8@garhos: >> I believe the 10019 came from Knuth, but can't see a reference. > Unlucky, I was to ask you how this 10_019 was computed. At least, this > magic number is not a prime number, the nearest is 1009. > > If this can help, may be some goodies there : > http://www.isthe.com/chongo/tech/comp/fnv/ > http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx Thanks for those references. That is good information for my own project, since several maps are used in it. Warren