httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Finch <...@dotat.at>
Subject Re: [PATCH] simple hash table implementation
Date Thu, 27 Apr 2000 00:12:49 GMT
Greg Stein <gstein@lyra.org> wrote:
>
>The code seems fine although I'd want to have get/set forms where I can
>pass my own hash value. That allows me to optimize the hashing algorithm
>for the domain of my key values.

That's a reasonable idea, although I remain to be convinced by the
benefit. Do you have any alternative hash algorithms to suggest?

>I'm not up on my hash table theory, but it seems that your closed hash
>table will have more collisions than an open table. True?

It depends on the tuning. It's perfectly simple to arrange for your
lower density of between 1/4 and 1/2 instead of my code's 1/2 .. 1/1.
Swings and roundabouts AFAICT. And I still think that resolving
collisions with linked lists is harder to get wrong.

Faster code backed up with benchmarks is welcome!

Tony.
-- 
f.a.n.finch    fanf@demon.net    dot@dotat.at
318 butterfly appliqués on the sliding glass door of doom

Mime
View raw message