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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Ada.Containers.Hash_Type -> 64 bit Date: Sat, 31 Aug 2013 02:55:51 +0200 Organization: A noiseless patient Spider Message-ID: <87bo4eu19k.fsf@ludovic-brenta.org> References: <5220afe9$0$6637$9b4e6d93@newsspool2.arcor-online.net> <4c5570a9-cf04-4e04-a10f-5321e183d884@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx05.eternal-september.org; posting-host="70a3d572c76b57e922c092418134871d"; logging-data="21174"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+fnZQSpHC7hdaE/mZ/jiAk" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:X1+iLcEJQ9uUXrUYQ9r4LvQ2koc= sha1:u9y279PmGz4iSnz3h5PKxbNXBPs= X-Original-Bytes: 2174 Xref: number.nntp.dca.giganews.com comp.lang.ada:183236 Date: 2013-08-31T02:55:51+02:00 List-Id: Peter Brooks writes on comp.lang.ada: > On Friday, 30 August 2013 16:45:57 UTC+2, G.B. wrote: >> On 30.08.13 16:32, Peter Brooks wrote: >> >>> Ada.Strings.Hash defines Ada.Containers.Hash_Type as 32 bits >>> long. How can I increase it to 64 bits? >> >> I suspect you can't since Hash_Type is implementation-defined. >> (Implying that you'd have to change, or at least check, the >> implementation of everything involving Hash_Type.) >> >> A quirky workaround might be to use two hash tables, one for the >> upper quadword, and one for the lower. >> > Thank you! That's a pity, but there we are. It looks as if I'll have > to re-write it. Out of curiosity, why do you think you need a 64-bit hash_type? Do you expect more than 4 billion objects in your table? If so, what is the expected total size your hash table, and are you sure the address space on your target platform is large enough to accommodate it? Maybe this is an on-disk hash_table, IOW a content-addressed file system you are designing? -- Ludovic Brenta.