From: Matthew Heaney <matthewjheaney@earthlink.net>
Subject: Re: hashed_maps
Date: Fri, 14 Oct 2005 04:49:18 GMT
Date: 2005-10-14T04:49:18+00:00 [thread overview]
Message-ID: <u1x2o7lfd.fsf@earthlink.net> (raw)
In-Reply-To: wcczmpdnm53.fsf@shell01.TheWorld.com
Robert A Duff <bobduff@shell01.TheWorld.com> writes:
> Addresses usually have the low 2 or 3 bits equal to zero, because of
> alignment concerns. So use Address_To_Integer and shift right 3 bits.
> Then mod by the size of the hash table, or take some high-order bits
> and add them into the low-order bits.
In the case of the standard hashed containers, I'm not sure you would
need to bother, since the mod'ing is done internally by the container.
I think you'd only need to right shift if you were to throw away upper
bits, say because System.Storage_Elements.Integer_Address has a wider
range than Ada.Containers.Hash_Type.
prev parent reply other threads:[~2005-10-14 4:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-11 15:58 hashed_maps Lucretia
2005-10-11 17:45 ` hashed_maps Jeffrey R. Carter
2005-10-12 17:04 ` hashed_maps Lucretia
2005-10-13 5:17 ` hashed_maps Matthew Heaney
2005-10-13 14:45 ` hashed_maps Lucretia
2005-10-13 14:55 ` hashed_maps Matthew Heaney
2005-10-13 15:25 ` hashed_maps Lucretia
2005-10-13 19:47 ` hashed_maps Simon Wright
2005-10-14 4:35 ` hashed_maps Matthew Heaney
2005-10-14 4:41 ` hashed_maps Matthew Heaney
2005-10-17 15:48 ` hashed_maps Lucretia
2005-10-13 20:55 ` hashed_maps Björn Persson
2005-10-13 21:27 ` hashed_maps Robert A Duff
2005-10-14 4:49 ` Matthew Heaney [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