Unordered container insertion hints
François Dumont
frs.dumont@gmail.com
Thu May 23 20:02:00 GMT 2013
Some feedback regarding this patch ?
Thanks
On 05/15/2013 09:49 PM, François Dumont wrote:
> Hi
>
> Here is a patch to consider the hint that users can give to
> enhancement insertion performances. As you can see I only use it for
> unordered_multi* containers to potentially avoid research within the
> bucket nodes.
>
> Note that I have use a call to _M_equals to avoid a hash code
> computation when we end up inserting after the hint. It is an
> optimization because I consider that _M_equals will be always faster
> than a hash code computation. I think that I will submit an other
> patch later to generalize this when possible to limit the small
> performance we noticed when adopting the new data model (unless
> performance tests are showing me that it is worst).
>
> I try to document it. If you accept this patch tell me if it is
> with or without the documentation cause I know that my English is not
> good enough. I didn't find out how I can fix the doc URLs regarding
> usage of hints in the std::unordered_* Doxygen comments.
>
> 2013-05-20 François Dumont <fdumont@gcc.gnu.org>
>
> * include/bits/hashtable_policy.h (_Insert_base): Consider hint in
> insert methods.
> * include/bits/hashtable.h: Likewise.
> * testsuite/23_containers/unordered_multimap/insert/hint.cc: New.
> * doc/xml/manual/containers.xml: Document hitting in unordered
> containers.
>
> François
>
More information about the Libstdc++
mailing list