|
Boost : |
From: Daniel James (daniel_james_at_[hidden])
Date: 2008-01-03 17:44:15
On 03/01/2008, Lipik Contact <contact.lipik_at_[hidden]> wrote:
> Another question: any thoughts on whether it is better to use
> boost::hash for pointers and wstrings, or would a modification of the
> FNV hash included with unordered give better results?
It's hard to say. boost::hash makes a good default, and if you then
find that the container is slow it might be worth investigating
alternatives (using typedefs will make it easier to experiment). I'll
be adding some more example hash functions soon which might also be
appropriate. But boost::hash should give good results.
I don't thing the FNV hash would be appropriate for pointers though.
> Also, I'm assuming that I can plug this library into boost-1.33.1.
I think so, although I haven't tested it. Looking in the repository,
boost::hash is present, and so is a required fix in
boost/detail/allocator_utilities.hpp which I think are the main
requirements. You might not be able to run the exception tests against
1.33.1, but the other tests should be runnable if you want to check.
Also, I'll be adding the library to trunk soon (hopefully for release
in 1.36) and once I've got the unit tests passing on the main
compilers will upload a new version to the vault, so look out for
that.
Daniel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk