Boost logo

Boost :

Subject: Re: [boost] [tokenmap] updated perfect hash container in sandbox
From: Daniel Trebbien (dtrebbien_at_[hidden])
Date: 2010-04-24 21:09:25


On 2010-04-24, Slawomir Lisznianski <sl_at_[hidden]> wrote:
> Thorsten Ottosen wrote:
>> If there is no reason that performance cannot be compared to
>> boost::unordered_map, then please also perform this comparison.
>
> will do..
>

In order for the comparison to be more fair, somehow the time that
`boost::unordered_map` took to compute the hashes of `key_type`
objects must be "subtracted out". Looking through the documentation
(http://www.boost.org/doc/libs/1_42_0/doc/html/boost/unordered_map.html),
it does not appear that `boost::unordered_map` provides "expert" find
routines that take hashes, but perhaps it would be easy to add one for
the purpose of the comparison:

`xfind` takes a hash `h` and returns an `iterator` to the element with
a key that hashes to `h`, or `end()` if no such element is found.

Such a function could even be added to `boost::unordered_map`.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk