|
Boost : |
Subject: Re: [boost] [hash] regular behaviour of hash function for double values
From: Topher Cooper (topher_at_[hidden])
Date: 2012-02-01 15:43:51
On 2/1/2012 3:59 AM, Daniel James wrote:
> There are very good alternative open source implementations out there.
> You shouldn't need to rewrite anything.
>
>
But if, as you say, the standard implies this trade-off, then conformant
implementations will end up with roughly the same trade-off. This is
only an option if your justification for a low-quality hash function is
incorrect. Hashing functions are easily implemented and fairly easily
adjusted, replacing a complete container implementation or adjusting one
is much more work. If one has a separate hash function and hash
container it makes more sense to depend on the hash function to be
responsible for the quality of the hash rather than the container, in
addition to it being simpler for the developer using it.
Since there are /very good/ implementations available, what is the
justification for a poor one in the Boost library?
Besides, it would not occur to most developers that the Boost
implementation of standard hash is not up to the quality standards that
Boost is known for overall. It never occurred to me to check, and I
have the necessary background to determine that it isn't if I had
checked, and to understand the consequences that it is not. I have some
code to replace, and some performance results to review to see if they
were effected (probably not, but I need to check to be sure).
Topher
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk