Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-03-10 09:10:16

"Peter Dimov" <pdimov_at_[hidden]> wrote in message
| Peter Dimov wrote:
| > But as I said, benchmarking hash functions is pointless. Real programs
| > do not compute the hash value of a random 256 byte buffer five million
| > times.
| ... or if they do, they use different 256 byte buffers and do not operate
| from the L1 cache. ;-)

no, but AFAICT we cannot exclude that a certain hash-function is much faster
otherwise behaves as good as the other "naive" ones.

Can anybody answer this question: is it always optimal to use the whole
range to compute the hash value; for eg. strings, if I know the average length
of my strings, I can't see that it would make sense to process much more
the the average length (or perhaps even shorter).

maybe hash_range should be specified as

< unsigned max, // max length of range to consider
   class Iter
hash_range( Iter, Iter );



Boost list run by bdawes at, gregod at, cpdaniel at, john at