RPM Community Forums

Mailing List Message of <rpm-devel>

Re: [CVS] RPM: rpm/ TODO

From: Ralf S. Engelschall <rse+rpm-devel@rpm5.org>
Date: Fri 14 Dec 2007 - 16:17:45 CET
Message-ID: <20071214151745.GA40550@engelschall.com>
On Fri, Dec 14, 2007, Jeff Johnson wrote:

>   @@ -170,4 +170,8 @@
>    	script kiddie progress bars across the screen.
>        - jbj: arbitrary "%foo -p /bar" scriptlets as pair'ed RPMTAG_{FOO,FOOPROG}.
>        - jbj: arbitrary triggers, like scriptlets, but with a condition check too.
>   +    - jbj: the hash *ahem* algorithm at rpmio/rpmhash.c:77 hashFunctionString()
>   +	is pathetic. Ditto, rpmdb/fprint.c:186 fpHashFunction(). FYI, the
>   +	fingerprint hash is in the top 10 pigs when profiling rpm installs, so
>   +	better has immediate performance benefits. rpmio/lookup3.c == better.

Question: what is the purpose of hashFunctionString()'s result:
to be used for mostly uniquely identify the input (aka a more
cryptographically strong message digest) or just to be used for filing
the input in a hash table (aka just a standard hashing function). If
the first is the intention, then the implementation is semantically
bad, but a better implementation will be even much slower, of course.
If the second is the intention, we can improve it: a few years ago I've
measured lots of hash functions and have one of the fastest and best (in
terms of equal distribution) ones at hand...

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com
Received on Fri Dec 14 16:20:37 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.