comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Ada.Containers.Hash_Type -> 64 bit
Date: Sat, 31 Aug 2013 02:55:51 +0200
Date: 2013-08-31T02:55:51+02:00	[thread overview]
Message-ID: <87bo4eu19k.fsf@ludovic-brenta.org> (raw)
In-Reply-To: 4c5570a9-cf04-4e04-a10f-5321e183d884@googlegroups.com

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.


      reply	other threads:[~2013-08-31  0:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-30 14:32 Ada.Containers.Hash_Type -> 64 bit Peter Brooks
2013-08-30 14:45 ` G.B.
2013-08-30 15:43   ` Peter Brooks
2013-08-31  0:55     ` Ludovic Brenta [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox