This is the mail archive of the mailing list for the libstdc++ project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Add two tests of hash function quality

Hi Matt,
> This patch adds two very different tests to verify that we have a good
> hash function. This is a very large and well studied area, and in principle
> we could have many more tests of this sort, but a least these ones are
> a start.
> One test is very simple to describe: it hashes a set of strings to a set
> of buckets, and uses chi^2 to verify that the distribution is uniform.
> The other is slightly more complicated, but essentially it verifies that
> every bit of the input string affects every bit of the output hash code.
I think the patch is almost ready to go in. Thanks. I have only a
concern, that these tests may take a little too much to run (*) and
timeout on simulators: can you imagine a sensible way to use one of
those DejaGnu directives like (we have already quite a few examples in
the testsuite):

    // { dg-options "-DMAX_ITERATIONS=5" { target simulator } }

Thanks again,

(*) In particular, ~17 secs of real time on my rather new i7
machine. Should be easier to tweak, since doesn't use a statistical test...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]