This is the mail archive of the
mailing list for the libstdc++ project.
Re: Unordered container insertion hints
- From: François Dumont <frs dot dumont at gmail dot com>
- To: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 23 May 2013 22:01:54 +0200
- Subject: Re: Unordered container insertion hints
- References: <5193E6AE dot 8020306 at gmail dot com>
Some feedback regarding this patch ?
On 05/15/2013 09:49 PM, François Dumont wrote:
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
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 <email@example.com>
* include/bits/hashtable_policy.h (_Insert_base): Consider hint in
* include/bits/hashtable.h: Likewise.
* testsuite/23_containers/unordered_multimap/insert/hint.cc: New.
* doc/xml/manual/containers.xml: Document hitting in unordered