httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Finch <>
Subject Re: DBM stuff (was: cvs commit: apache-2.0 STATUS)
Date Sun, 23 Apr 2000 02:09:36 GMT
Greg Stein <> wrote:
>Oh, there is enough. When the hash algorithm starts talking about stuff
>like "GF(2^n)-{0}" then I get confoozled :-)  Python's hash table uses
>open addressing (rather than chaining) and uses that mathematical stuff to
>sequence through the items without repetition and without performing an
>integer modulus (% operator). My hash tables always used twin primes and
>the % operator, so this was pretty neat to see :-)
>But you are right: once you change the items that you store into the hash
>(i.e. something other than PyObjects) and the allocation policy, then it
>looks quite different. But that basic algorithm is quite nifty...

I think I prefer chaining because it's less magical. Python doesn't
like it because of allocation overheads, but they aren't an issue with
the pools implementation. I'm ill-disposed to it because some of the
comments in that code are bogus (it's quite clearly not using
prime-number hash table sizes, the maximum density is not 1/2, and the
description of the increment sequence generator function GF() is too

>> From the point of view of an ISP that doesn't want to be tied to a
>> platform because of the data files used by our customers, endian-
>> independence is a big win.
>Fair enough. I just figured that a little tool could export/import across
>the platforms, in which case endian-ness isn't a big deal.

You can provide the users with a tool but you can't make them use it :-)

>GDBM is endian-independent, too.

I suggest you check the source :-)

318 butterfly appliqués on the sliding glass door of doom

View raw message